Allow non-ascii filenames for attachments

This commit is contained in:
Mark Haines 2015-08-26 16:26:37 +01:00
parent efdaa5dd55
commit e85c7873dc
3 changed files with 17 additions and 8 deletions

View file

@ -38,6 +38,8 @@ def random_string_with_symbols(length):
def is_ascii(s):
try:
s.encode("ascii")
except UnicodeEncodeError:
return False
except UnicodeDecodeError:
return False
else: