Fix UnicodeEncodeError for file paths

- Fixes #35
This commit is contained in:
tomkat83 2016-05-15 16:33:53 +02:00
parent 2fe457e496
commit 9786aab050

View file

@ -954,4 +954,7 @@ def tryDecode(string, encoding='utf-8'):
string = string.decode(encoding, "ignore")
except TypeError:
string = string.decode()
except UnicodeEncodeError:
# Already in unicode - e.g. sometimes file paths
pass
return string