validate non-ascii values for swift properties

skip properties that are non-ascii values, but proceed
with properties that work. log these failed values back
to the user.

Change-Id: Iaca8909f4465a01c8aebfd290b1a322823702359
Closes-Bug: 1503898
This commit is contained in:
Steve Martinelli 2015-10-18 16:03:08 -04:00 committed by Dean Troyer
parent 6672f48642
commit 1bd337bd08

View File

@ -419,3 +419,11 @@ def build_kwargs_dict(arg_name, value):
if value:
kwargs[arg_name] = value
return kwargs
def is_ascii(string):
try:
string.decode('ascii')
return True
except UnicodeDecodeError:
return False