lots of ImportWarning noise

Bug #983875 reported by Colin Watson on 2012-04-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
Undecided
Unassigned

Bug Description

$ foo
/usr/lib/command-not-found:12: ImportWarning: Not importing directory '/usr/lib/gettext': missing __init__.py
  import gettext
/usr/lib/python2.7/gettext.py:49: ImportWarning: Not importing directory '/usr/lib/locale': missing __init__.py
  import locale, copy, os, re, struct, sys
/usr/lib/python2.7/dist-packages/aptsources/sourceslist.py:35: ImportWarning: Not importing directory '/usr/lib/apt': missing __init__.py
  from apt.deprecation import function_deprecated_by
/usr/lib/python2.7/httplib.py:1136: ImportWarning: Not importing directory '/usr/lib/ssl': missing __init__.py
  import ssl
No command 'foo' found, did you mean:
 Command 'fio' from package 'fio' (universe)
 Command 'goo' from package 'goo' (universe)
 Command 'fop' from package 'fop' (main)
 Command 'fox' from package 'objcryst-fox' (universe)
 Command 'xoo' from package 'xoo' (universe)
 Command 'fgo' from package 'fgo' (universe)
 Command 'zoo' from package 'zoo' (universe)
foo: command not found

This is untidy, and arises from c-n-f's odd installation path. Perhaps forcibly remove /usr/lib from sys.path to avoid this?

Colin Watson (cjwatson) on 2012-04-17
summary: - lots of ImportError noise
+ lots of ImportWarning noise
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package command-not-found - 0.2.46ubuntu6

---------------
command-not-found (0.2.46ubuntu6) precise; urgency=low

  * Import sys again in command-not-found's KeyboardInterrupt handler
    (LP: #864461).
  * Forcibly remove /usr/lib from the start of sys.path to avoid unsightly
    ImportWarning noise (LP: #983875).
  * Update scan.data to current precise.
 -- Colin Watson <email address hidden> Tue, 17 Apr 2012 12:35:51 +0100

Changed in command-not-found (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers