Merge "validate non-ascii values for swift properties"

This commit is contained in:
Jenkins 2015-11-12 22:38:58 +00:00 committed by Gerrit Code Review
commit a140548566
1 changed files with 8 additions and 0 deletions

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