diff options
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 8d50294..7972aa9 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -78,6 +78,9 @@ def normcase(s): """Normalize case of pathname. Makes all characters lowercase and all slashes into backslashes.""" + if not isinstance(s, (bytes, str)): + raise TypeError("normcase() argument must be str or bytes, " + "not '{}'".format(s.__class__.__name__)) return s.replace(_get_altsep(s), _get_sep(s)).lower() |