homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bug in pkgutil.py with suggested fix
Type: Stage: resolved
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder: pkgutil.walk_packages fails on write-only directory in sys.path
View: 7367
Assigned To: Nosy List: dfwc, ned.deily
Priority: normal Keywords:

Created on 2012年02月15日 17:18 by dfwc, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (2)
msg153421 - (view) Author: Don Caldwell (dfwc) Date: 2012年02月15日 17:18
in iter_modules there is a loop for fn in os.listdir(path): that can
fail on an OSError exception. here is a patch
 try:
 for fn in os.listdir(path):
 subname = inspect.getmodulename(fn)
 if subname=='__init__':
 ispkg = True
 break
 else:
 continue # not a package
 except OSError as (errno, strerror):
 print "%s: %s\n" % (fn, strerror)
msg153427 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012年02月15日 18:56
This issue was recently fixed by the changes for Issue7367 and will be released in Python 2.7.3 and 3.2.3. Python 2.6 no longer receives bug fixes, only security fixes.
History
Date User Action Args
2022年04月11日 14:57:26adminsetgithub: 58230
2012年02月15日 18:56:21ned.deilysetstatus: open -> closed

superseder: pkgutil.walk_packages fails on write-only directory in sys.path

nosy: + ned.deily
messages: + msg153427
resolution: out of date
stage: resolved
2012年02月15日 17:18:30dfwccreate

AltStyle によって変換されたページ (->オリジナル) /