]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm.macros
- update ver in dep
[packages/rpm-build-macros.git] / rpm.macros
index a52fcbb5cbc5829af64cf6222adc3691677e09a3..8537d8ad108432d4f03296fda34e258d6f2af89c 100644 (file)
@@ -1859,7 +1859,7 @@ io.open("/etc/shells", "w"):write(s)\
 #
 # Requirements:
 # BuildRequires:       python
-# BuildRequires:       rpmbuild(macros) >= 1.469
+# BuildRequires:       rpmbuild(macros) >= 1.602
 
 %py_lint() \
 __py_lint() { \
@@ -1867,7 +1867,7 @@ find "$@" -type f -name '*.py' | python -c ' \
 import sys \
 import compiler \
 \
-err = 0\
+found = err = 0\
 for f in sys.stdin: \
        fd = open(f.strip()) \
        c = fd.read() \
@@ -1878,7 +1878,10 @@ for f in sys.stdin: \
                print "py_lint: %s: %s" % (f.strip(), e) \
                err = err + 1\
 \
-if err: \
+if not found:\
+       print >> sys.stderr, "\\npy_lint: ERROR: No files processed.\\n" \
+       sys.exit(1) \
+elif err: \
        print >> sys.stderr, "\\npy_lint: ERROR: Syntax errors in %d files.\\n" % err \
        sys.exit(1) \
 else: \
This page took 0.036603 seconds and 4 git commands to generate.