mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #16696: fix comparison between bytes and string. Also, improve glob tests.
This commit is contained in:
commit
feb318a37a
2 changed files with 29 additions and 6 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue