diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-16 15:03:01 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-16 15:03:01 (GMT) |
commit | 5461558d1ab5809c44d02f5e8669aca64ec07404 (patch) | |
tree | 7815dfec2d4d4950428c7312870962d4b3d75f75 /Lib/glob.py | |
parent | 3d068b2ecfd0e04d61289dce5abed60cd88b4f9f (diff) | |
download | cpython-5461558d1ab5809c44d02f5e8669aca64ec07404.zip cpython-5461558d1ab5809c44d02f5e8669aca64ec07404.tar.gz cpython-5461558d1ab5809c44d02f5e8669aca64ec07404.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): |