[Python-checkins] r54197 - in python/trunk: Lib/glob.py Lib/test/test_glob.py Misc/NEWS

Georg Brandl g.brandl at gmx.net
Wed Mar 21 00:05:41 CET 2007


Guido van Rossum schrieb:
> This seems to have caused a new failure for me:
> 
> ERROR: test_glob_literal (__main__.GlobTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "Lib/test/test_glob.py", line 60, in test_glob_literal
>     u1 = glob.glob(u'*')
>   File "/usr/local/google/home/guido/python/trunk/Lib/glob.py", line 16, in glob
>     return list(iglob(pathname))
>   File "/usr/local/google/home/guido/python/trunk/Lib/glob.py", line
> 30, in iglob
>     for name in glob1(os.curdir, basename):
>   File "/usr/local/google/home/guido/python/trunk/Lib/glob.py", line
> 53, in glob1
>     dirname = unicode(dirname, sys.getfilesystemencoding())
> TypeError: unicode() argument 2 must be string, not None
> 
> On my system (derived from Ubuntu dapper), sys.getfilesystemencoding()
> returns None and the new code in glob.py doesn't seem to be prepared
> for that.

Thanks for noticing, I now select "sys.getfilesystemencoding() or 
sys.getdefaultencoding()".

Georg



More information about the Python-checkins mailing list