From e161efdd6720ae1f9c8f814acbefd0af76dafb4a Mon Sep 17 00:00:00 2001 From: Tim Gerla Date: Thu, 15 Aug 2013 08:15:34 -0700 Subject: [PATCH 1/2] Fix .ini skipping logic in inventory importer --- awx/main/management/commands/inventory_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/management/commands/inventory_import.py b/awx/main/management/commands/inventory_import.py index 23ca3545f5..66dbb78ed8 100644 --- a/awx/main/management/commands/inventory_import.py +++ b/awx/main/management/commands/inventory_import.py @@ -338,7 +338,7 @@ class GenericLoader(object): for f in glob.glob("%s/*" % src): if f.endswith(".ini"): # config files for inventory scripts should be ignored - pass + continue if not os.path.isdir(f): if os.access(f, os.X_OK): ExecutableJsonLoader().load(f, memGroup) From f78eb15e417ff3ba25c9f4cdc1c3c5c99182224c Mon Sep 17 00:00:00 2001 From: Tim Gerla Date: Thu, 15 Aug 2013 08:18:51 -0700 Subject: [PATCH 2/2] fix typo in json import error handling --- awx/main/management/commands/inventory_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/management/commands/inventory_import.py b/awx/main/management/commands/inventory_import.py index 66dbb78ed8..1301f577af 100644 --- a/awx/main/management/commands/inventory_import.py +++ b/awx/main/management/commands/inventory_import.py @@ -253,7 +253,7 @@ class ExecutableJsonLoader(BaseLoader): proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = proc.communicate() if proc.returncode != 0: - raise ImportException("%s list failed %s with output: %s" % (src, stderr, proc.returncode)) + raise ImportException("%s list failed %s with output: %s" % (cmd, stderr, proc.returncode)) data = {} try: data = json.loads(stdout)