From 80b1365d53fe480776c2b84d61cacbc54a5fb3dc Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 1 Nov 2014 23:19:25 -0400 Subject: [PATCH] now correctly processes modules when in subdirs of cloud --- hacking/module_formatter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hacking/module_formatter.py b/hacking/module_formatter.py index 1218b85e71c..fe0da35ed85 100755 --- a/hacking/module_formatter.py +++ b/hacking/module_formatter.py @@ -127,11 +127,12 @@ def list_modules(module_dir): files = glob.glob("%s/*/*" % module_dir) for d in files: if os.path.isdir(d): - files2 = glob.glob("%s/*" % d) + files2 = glob.glob("%s/*" % d) + glob.glob("%s/*/*" % d) for f in files2: - module = os.path.splitext(os.path.basename(f))[0] - category = os.path.dirname(f).split("/")[-1] + category = "cloud" + if os.path.dirname(f).split("/")[-2] != "cloud": + category = os.path.dirname(f).split("/")[-1] if not f.endswith(".py") or f.endswith('__init__.py'): # windows powershell modules have documentation stubs in python docstring