Use TypeError in glob_quote
This commit is contained in:
1 parent
344759e522
commit
72e4095354
1 file changed
+1
-1
@@ -101,7 +101,7 @@ def glob_quote(filestr):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if not isinstance(filestr, str):
|
if not isinstance(filestr, str):
|
||||||
raise ValueError(f'filestr must be a str, got "{type(filestr)}"')
|
raise TypeError(f'filestr must be a str, got "{type(filestr)}"')
|
||||||
|
|
||||||
return filestr.translate(str.maketrans(_glob_specials))
|
return filestr.translate(str.maketrans(_glob_specials))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user