summaryrefslogtreecommitdiff
path: root/Lib/glob.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-12-16 16:03:01 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-12-16 16:03:01 +0100
commit5461558d1ab5809c44d02f5e8669aca64ec07404 (patch)
tree7815dfec2d4d4950428c7312870962d4b3d75f75 /Lib/glob.py
parent3d068b2ecfd0e04d61289dce5abed60cd88b4f9f (diff)
downloadcpython-git-5461558d1ab5809c44d02f5e8669aca64ec07404.tar.gz
Issue #16696: fix comparison between bytes and string. Also, improve glob tests.
Diffstat (limited to 'Lib/glob.py')
-rw-r--r--Lib/glob.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/glob.py b/Lib/glob.py
index 7279244aa9..58888d64b5 100644
--- a/Lib/glob.py
+++ b/Lib/glob.py
@@ -63,7 +63,7 @@ def glob1(dirname, pattern):
return fnmatch.filter(names, pattern)
def glob0(dirname, basename):
- if basename == '':
+ if not basename:
# `os.path.split()` returns an empty basename for paths ending with a
# directory separator. 'q*x/' should match only directories.
if os.path.isdir(dirname):