From ef87d6ed94780fe00250a551031023aeb2898365 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 2 May 2007 19:09:54 +0000 Subject: Rip out all the u"..." literals and calls to unicode(). --- Lib/glob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/glob.py') diff --git a/Lib/glob.py b/Lib/glob.py index 75d7bf94e5..0e2bc1e734 100644 --- a/Lib/glob.py +++ b/Lib/glob.py @@ -49,8 +49,8 @@ def iglob(pathname): def glob1(dirname, pattern): if not dirname: dirname = os.curdir - if isinstance(pattern, unicode) and not isinstance(dirname, unicode): - dirname = unicode(dirname, sys.getfilesystemencoding() or + if isinstance(pattern, str) and not isinstance(dirname, str): + dirname = str(dirname, sys.getfilesystemencoding() or sys.getdefaultencoding()) try: names = os.listdir(dirname) -- cgit v1.2.1