diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-16 15:03:57 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-16 15:03:57 (GMT) |
commit | feb318a37aaed80633e621eb2d46b13ecf004583 (patch) | |
tree | e18e516754856a450f369f9fd7b1426696574a1c /Lib/glob.py | |
parent | 39a6ee20ac5f353a6b8204864d9491deb997ef88 (diff) | |
parent | 33138df36abda2d4f1e92537d375f04942d9ab19 (diff) | |
download | cpython-feb318a37aaed80633e621eb2d46b13ecf004583.zip cpython-feb318a37aaed80633e621eb2d46b13ecf004583.tar.gz cpython-feb318a37aaed80633e621eb2d46b13ecf004583.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 00f867f..3c9c30c 100644 --- a/Lib/glob.py +++ b/Lib/glob.py @@ -62,7 +62,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): |