From 70989ca6169e1979dee507e0b272a792ecf999b4 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Tue, 3 Sep 2019 21:31:46 -0400 Subject: [PATCH] cli: fix a bug introduced in @ file support --- awxkit/awxkit/cli/options.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awxkit/awxkit/cli/options.py b/awxkit/awxkit/cli/options.py index 1620921c74..1f6b387c48 100644 --- a/awxkit/awxkit/cli/options.py +++ b/awxkit/awxkit/cli/options.py @@ -6,6 +6,7 @@ import re import yaml from distutils.util import strtobool +import six from .custom import CustomAction from .format import add_output_formatting_arguments @@ -146,7 +147,7 @@ class ResourceOptionsParser(object): for k, v in parsed.items(): # add support for file reading at top-level JSON keys # (to make things like SSH key data easier to work with) - if v.startswith('@'): + if isinstance(v, six.text_type) and v.startswith('@'): path = os.path.expanduser(v[1:]) if os.path.exists(path): parsed[k] = open(path).read()