don't apply str.lower() to unicode
This commit is contained in:
1 parent
feff5e0978
commit
9c5d1dec59
2 files changed
+2
-2
No files matched your search
@@ -1097,7 +1097,7 @@ class UrlProxyHandler(RequestlessExceptionLoggingMixin,
|
||||
if not self._basename:
|
||||
return None
|
||||
|
||||
typeValue = list(map(str.strip, content_type.split(";")))
|
||||
typeValue = list(x.strip() for x in content_type.split(";"))
|
||||
if len(typeValue) == 0:
|
||||
return None
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ def is_allowed_file(filename, extensions):
|
||||
boolean: True if the file name's extension matches one of the allowed extensions, False otherwise.
|
||||
"""
|
||||
|
||||
return "." in filename and filename.rsplit(".", 1)[1].lower() in map(str.lower, extensions)
|
||||
return "." in filename and filename.rsplit(".", 1)[1].lower() in (x.lower() for x in extensions)
|
||||
|
||||
|
||||
def get_formatted_timedelta(d):
|
||||
|
||||
Reference in new issue
Block a user