Signed-off-by: Dan McGee <dan@archlinux.org> --- namcap.py | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/namcap.py b/namcap.py index 55c5240..e36bb7a 100755 --- a/namcap.py +++ b/namcap.py @@ -150,6 +150,10 @@ if (args == []): m = process_tags(machine=machine_readable) packages = args +# No rules selected? Then select them all! +if active_modules == []: + active_modules = modules + # Go through each package, get the info, and apply the rules for package in packages: if not os.access(package, os.R_OK): @@ -169,10 +173,6 @@ for package in packages: pkginfo = pacman.load(package) - # No rules selected? Then select them all! - if active_modules == []: - active_modules = modules - # Loop through each one, load them apply if possible for i in active_modules: cur_class = __import__('Namcap.' + i, globals(), locals(), [Namcap]) @@ -216,9 +216,6 @@ for package in packages: print "Error: " + package + " is not a valid PKGBUILD" continue - if active_modules == []: - active_modules = modules - for i in active_modules: cur_class = __import__('Namcap.' + i, globals(), locals(), [Namcap]) pkg = cur_class.package() -- 1.6.4.4