diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-16 15:03:42 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-16 15:03:42 (GMT) |
commit | 33138df36abda2d4f1e92537d375f04942d9ab19 (patch) | |
tree | a1ec57e56af687b56e401197699f9afe3ddb021d /Lib/glob.py | |
parent | 3c331bb729b78419da455b9f8be81b566cb7a489 (diff) | |
parent | 5461558d1ab5809c44d02f5e8669aca64ec07404 (diff) | |
download | cpython-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.py | 2 |
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): |