[Bug 920300] Re: Does not handle KeyboardInterrupt

Zygmunt Krynicki zygmunt.krynicki at canonical.com
Tue Jan 31 08:43:05 UTC 2012


On 01/31/2012 09:29 AM, Vadim Rutkovsky wrote:
> Can't we just handle it and show pretty 'Cancelled' output? See
> http://effbot.org/zone/stupid-exceptions-keyboardinterrupt.htm for
> example
>

Please re-read my previous comment. Unless you patch python there is 
nothing an application can do to prevent this. We _do_ handle 
KeyboardInterrupt exceptions by the way, just that most people don't get 
to see that one as it simply silently quits.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to command-not-found in Ubuntu.
https://bugs.launchpad.net/bugs/920300

Title:
  Does not handle KeyboardInterrupt

Status in command-not-found handler:
  Won't Fix
Status in “command-not-found” package in Ubuntu:
  Invalid

Bug description:
  I get:

  
  File "/usr/lib/python2.7/site.py", line 562, in <module>
      main()
    File "/usr/lib/python2.7/site.py", line 545, in main
      known_paths = addsitepackages(known_paths)
    File "/usr/lib/python2.7/site.py", line 327, in addsitepackages
      addsitedir(sitedir, known_paths)
    File "/usr/lib/python2.7/site.py", line 195, in addsitedir
      addpackage(sitedir, name, known_paths)
    File "/usr/lib/python2.7/site.py", line 148, in addpackage
      f = open(fullname, "rU")
  KeyboardInterrupt

  
  Whenever I press ctrl+c to stop it from running, using 0.2.44.1ubuntu1. It shouldn't be erroring out when I wish to cancel it.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: command-not-found 0.2.44.1ubuntu1
  ProcVersionSignature: Ubuntu 3.0.0-15.25-generic 3.0.13
  Uname: Linux 3.0.0-15-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 1.23-0ubuntu4
  Architecture: amd64
  CheckboxSubmission: 65532cf2dcc18adf59d8dfa735190aed
  CheckboxSystem: 3e53d3ea5811723345f19eff5070f9ab
  Date: Mon Jan 23 15:13:17 2012
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110413)
  PackageArchitecture: all
  ProcEnviron:
   LANGUAGE=en_CA:en
   PATH=(custom, user)
   LANG=en_CA.UTF-8
   SHELL=/bin/bash
  SourcePackage: command-not-found
  UpgradeStatus: Upgraded to oneiric on 2011-10-19 (95 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/command-not-found/+bug/920300/+subscriptions




More information about the foundations-bugs mailing list