diff options
author | Georg Brandl <georg@python.org> | 2007-03-20 23:05:14 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-03-20 23:05:14 +0000 |
commit | b54a809825ca010bdf3d4902fa8c8a4870c5baf1 (patch) | |
tree | 2fd3854a29658277944ee4f1a8e8b8d8dec36b7d | |
parent | 0bbbfc4c0b0cf84a23d2644080d09fb8af5324d2 (diff) | |
download | cpython-git-b54a809825ca010bdf3d4902fa8c8a4870c5baf1.tar.gz |
Fix for glob.py if filesystem encoding is None.
-rw-r--r-- | Lib/glob.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/glob.py b/Lib/glob.py index a92b11f431..75d7bf94e5 100644 --- a/Lib/glob.py +++ b/Lib/glob.py @@ -50,7 +50,8 @@ def glob1(dirname, pattern): if not dirname: dirname = os.curdir if isinstance(pattern, unicode) and not isinstance(dirname, unicode): - dirname = unicode(dirname, sys.getfilesystemencoding()) + dirname = unicode(dirname, sys.getfilesystemencoding() or + sys.getdefaultencoding()) try: names = os.listdir(dirname) except os.error: |