mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
fix broken sphinx docs build
This commit is contained in:
@@ -3,6 +3,7 @@ import functools
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from distutils.util import strtobool
|
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
|
# 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
|
# just assume it's a list of str, but the API doesn't actually
|
||||||
# explicitly tell us in OPTIONS all the time)
|
# 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
|
kwargs['type'] = int
|
||||||
else:
|
else:
|
||||||
kwargs['choices'] = [str(choice) for choice in kwargs['choices']]
|
kwargs['choices'] = [str(choice) for choice in kwargs['choices']]
|
||||||
|
|||||||
Reference in New Issue
Block a user