We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3afce4e commit e2508a7Copy full SHA for e2508a7
1 file changed
frameioclient/utils.py
@@ -95,9 +95,17 @@ def normalize_filename(fn):
95
"""
96
validchars = "-_.() "
97
out = ""
98
+
99
+ if isinstance(fn, str):
100
+ pass
101
+ elif isinstance(fn, unicode):
102
+ fn = str(fn.decode('utf-8', 'ignore'))
103
+ else:
104
105
106
for c in fn:
107
if str.isalpha(c) or str.isdigit(c) or (c in validchars):
108
out += c
109
else:
110
out += "_"
- return out
111
+ return out
0 commit comments