diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index 51e2a2f..8db4f35 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -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