Package: python2.7
Version: 2.7.10-3
Severity: minor

If a module cannot be imported because of wrong permissions, pydoc -k fails with unhelpful exception:

$ touch foobar.py
$ chmod 0 foobar.py
$ PYTHONPATH=$PWD pydoc2.7 -k foobar
Traceback (most recent call last):
 File "/usr/bin/pydoc2.7", line 5, in <module>
   pydoc.cli()
 File "/usr/lib/python2.7/pydoc.py", line 2345, in cli
   apropos(val)
 File "/usr/lib/python2.7/pydoc.py", line 2042, in apropos
   ModuleScanner().run(callback, key, onerror=onerror)
 File "/usr/lib/python2.7/pydoc.py", line 2023, in run
   module = loader.load_module(modname)
AttributeError: 'NoneType' object has no attribute 'load_module'


Please at least include name of the module that is at fault in the error message.


-- System Information:
Debian Release: stretch/sid
 APT prefers unstable
 APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages python2.7 depends on:
ii  libpython2.7-stdlib  2.7.10-3
ii  mime-support         3.58
ii  python2.7-minimal    2.7.10-3

--
Jakub Wilk


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to