commit | b54a809825ca010bdf3d4902fa8c8a4870c5baf1 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Tue Mar 20 23:05:14 2007 +0000 |
committer | Georg Brandl <georg@python.org> | Tue Mar 20 23:05:14 2007 +0000 |
tree | 2fd3854a29658277944ee4f1a8e8b8d8dec36b7d | |
parent | 0bbbfc4c0b0cf84a23d2644080d09fb8af5324d2 [diff] [blame] |
Fix for glob.py if filesystem encoding is None.
diff --git a/Lib/glob.py b/Lib/glob.py index a92b11f..75d7bf9 100644 --- a/Lib/glob.py +++ b/Lib/glob.py
@@ -50,7 +50,8 @@ 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: