summaryrefslogtreecommitdiffstats
path: root/Lib/glob.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-12-16 15:03:42 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-12-16 15:03:42 (GMT)
commit33138df36abda2d4f1e92537d375f04942d9ab19 (patch)
treea1ec57e56af687b56e401197699f9afe3ddb021d /Lib/glob.py
parent3c331bb729b78419da455b9f8be81b566cb7a489 (diff)
parent5461558d1ab5809c44d02f5e8669aca64ec07404 (diff)
downloadcpython-33138df36abda2d4f1e92537d375f04942d9ab19.zip
cpython-33138df36abda2d4f1e92537d375f04942d9ab19.tar.gz
cpython-33138df36abda2d4f1e92537d375f04942d9ab19.tar.bz2
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 7279244..58888d6 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):