Remove isinstance() from fileutil.path_safe()

paths are derived from urls which are strings.
This commit is contained in:
Chris Mayo 2020-06-18 19:27:06 +01:00
parent f86e506de4
commit 8f9f687ed8

View file

@ -70,7 +70,7 @@ else:
def path_safe(path):
"""Ensure path string is compatible with the platform file system encoding."""
if isinstance(path, str) and not os.path.supports_unicode_filenames:
if path and not os.path.supports_unicode_filenames:
path = path.encode(FSCODING, "replace").decode(FSCODING)
return path