[Bug 864461] Re: command-not-found crashed with NameError in __main__: name 'sys' is not defined

Colin Watson cjwatson at canonical.com
Sun Oct 2 20:11:35 UTC 2011


This is a race condition; it happens if you manage to interrupt command-
not-found before it's managed to import sys.

Perhaps the exception handler should import sys again?

** Changed in: command-not-found (Ubuntu)
       Status: New => Triaged

** Changed in: command-not-found (Ubuntu)
   Importance: Undecided => Medium

** Visibility changed to: Public

-- 
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/864461

Title:
  command-not-found crashed with NameError in __main__: name 'sys' is
  not defined

Status in “command-not-found” package in Ubuntu:
  Triaged

Bug description:
  got mistaken in name of command "top" in terminal: type tp instead,
  command-not-found crashes

  ProblemType: Crash
  DistroRelease: Ubuntu 11.10
  Package: command-not-found 0.2.44ubuntu1
  ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
  Uname: Linux 3.0.0-12-generic i686
  ApportVersion: 1.23-0ubuntu2
  Architecture: i386
  Date: Sun Oct  2 13:46:58 2011
  ExecutablePath: /usr/lib/command-not-found
  InstallationMedia: Lubuntu 10.10 "Maverick Meerkat" - i386 (20101010)
  InterpreterPath: /usr/bin/python2.7
  PackageArchitecture: all
  ProcCmdline: /usr/bin/python /usr/lib/command-not-found -- tp
  ProcEnviron:
   SHELL=/bin/bash
   LANG=ru_RU.UTF-8
  PythonArgs: ['/usr/lib/command-not-found', '--', 'tp']
  SourcePackage: command-not-found
  Title: command-not-found crashed with NameError in __main__: name 'sys' is not defined
  Traceback:
   Traceback (most recent call last):
     File "/usr/lib/command-not-found", line 20, in <module>
       sys.exit(127)
   NameError: name 'sys' is not defined
  UpgradeStatus: Upgraded to oneiric on 2011-09-11 (21 days ago)
  UserGroups: adm admin cdrom dialout dip fuse lpadmin plugdev sambashare

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




More information about the foundations-bugs mailing list