From 2ec90f17d0128c60252c2d27926c567c84488f2b Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Mon, 4 Nov 2019 09:32:04 -0500 Subject: [PATCH] fix broken sphinx docs build --- awxkit/awxkit/cli/options.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awxkit/awxkit/cli/options.py b/awxkit/awxkit/cli/options.py index c198809e6f..6cc784b51d 100644 --- a/awxkit/awxkit/cli/options.py +++ b/awxkit/awxkit/cli/options.py @@ -3,6 +3,7 @@ import functools import json import os import re +import sys import yaml from distutils.util import strtobool @@ -216,7 +217,8 @@ class ResourceOptionsParser(object): # if there are choices, try to guess at the type (we can't # just assume it's a list of str, but the API doesn't actually # explicitly tell us in OPTIONS all the time) - if isinstance(kwargs['choices'][0], int): + sphinx = 'sphinx-build' in ' '.join(sys.argv) + if isinstance(kwargs['choices'][0], int) and not sphinx: kwargs['type'] = int else: kwargs['choices'] = [str(choice) for choice in kwargs['choices']]