commit | 5461558d1ab5809c44d02f5e8669aca64ec07404 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sun Dec 16 16:03:01 2012 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sun Dec 16 16:03:01 2012 +0100 |
tree | 7815dfec2d4d4950428c7312870962d4b3d75f75 | |
parent | 3d068b2ecfd0e04d61289dce5abed60cd88b4f9f [diff] [blame] |
Issue #16696: fix comparison between bytes and string. Also, improve glob tests.
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 @@ 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):