[apparmor] [patch] utils/Makefile: remove superfluous grep -v from pyflakes call

Christian Boltz apparmor at cboltz.de
Thu Nov 13 18:12:23 UTC 2014


Hello,

utils/Makefile contains a grep -v "undefined name _". Some manual 
testing shows that pyflakes doesn't print any warning about "_", so this 
grep is superfluous.

Removing the grep also means we don't need a tempfile for the pyflakes 
output anymore, which simplifies the pyflakes call a lot.

I tested the changed Makefile, and it still complains about 
test-severity.py. If I move away that file, it runs successfully.


=== modified file 'utils/Makefile'
--- utils/Makefile      2014-11-10 19:14:35 +0000
+++ utils/Makefile      2014-11-13 18:10:34 +0000
@@ -98,12 +98,9 @@
        for i in ${PERLTOOLS} ; do \
                perl -c $$i || exit 1; \
        done
-       tmpfile=$$(mktemp --tmpdir aa-pyflakes-XXXXXX); \
        for i in ${PYTOOLS} apparmor test/*.py; do \
                echo Checking $$i; \
-               pyflakes $$i 2>&1 | grep -v "undefined name '_'" > $$tmpfile; \
-               test -s $$tmpfile && cat $$tmpfile && rm -f $$tmpfile && exit 1; \
-       done || true; \
-       rm -f $$tmpfile
+               pyflakes $$i || exit 1; \
+       done
        $(MAKE) -C test check
        $(MAKE) -C vim check




Regards,

Christian Boltz
-- 
I wish I knew enough C++ to produce a patch, but unfortunately I'm
better at being annoying on the mailing list than I am at coding :-)
["C" in opensuse-factory]




More information about the AppArmor mailing list