diff --git a/awx/plugins/inventory/awxrest.py b/awx/plugins/inventory/awxrest.py index 9aec595eff..1f3630b6a6 100755 --- a/awx/plugins/inventory/awxrest.py +++ b/awx/plugins/inventory/awxrest.py @@ -133,7 +133,10 @@ class InventoryScript(object): else: sys.stderr.write('%s\n' % str(e)) if hasattr(e, 'response'): - sys.stderr.write('%s\n' % e.response.content) + if hasattr(e.response, 'content'): + sys.stderr.write('%s\n' % e.response.content) + else: + sys.stderr.write('%s\n' % e.response) sys.exit(1) def main(): diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 36f39ac3ec..7a1fb02a9e 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -662,10 +662,7 @@ ACTIVITY_STREAM_ENABLED = True ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC = False # Internal API URL for use by inventory scripts and callback plugin. -if 'devserver' in INSTALLED_APPS: - INTERNAL_API_URL = 'http://127.0.0.1:%s' % DEVSERVER_DEFAULT_PORT -else: - INTERNAL_API_URL = 'http://127.0.0.1:8000' +INTERNAL_API_URL = 'http://127.0.0.1:%s' % DEVSERVER_DEFAULT_PORT # ZeroMQ callback settings. CALLBACK_CONSUMER_PORT = "tcp://127.0.0.1:5556"