From: Luke Shumaker <lukeshu@parabola.nu> https://bugs.archlinux.org/task/57193 If the user mistakenly passes in some other (non-package, non-PKGBUILD) file, instead of refusing to process it (saying "Error: Cannot process ${filename}"), it will now try to parse it as a PKGBUILD, probably encounter and print at least one error, but finally say "Error: ${filename} is not a valid PKGBUILD". This is actually probably *more* helpful to a confused user who passed in the wrong file. --- namcap.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/namcap.py b/namcap.py index b62a2fa..fd62d3c 100755 --- a/namcap.py +++ b/namcap.py @@ -248,9 +248,7 @@ for package in packages: if os.path.isfile(package) and tarfile.is_tarfile(package): process_realpackage(package, active_modules) - elif package.endswith('PKGBUILD'): + else: process_pkgbuild(package, active_modules) - else: - print("Error: Cannot process %s" % package) # vim: set ts=4 sw=4 noet: -- 2.15.1