]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - bin/pfa-lintpkg
Switch to Python 3 for rpm.org rpm
[projects/pld-ftp-admin.git] / bin / pfa-lintpkg
index 716cd88040cdaee03dae58fb875cabf9ef4317ec..1cb1edf657d0a11a47d2f7758a5064d045f34e0e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
 
 from __future__ import print_function
@@ -99,7 +99,7 @@ class LintPkg:
 
     def get_stats(self, file):
         cachefile = self.cachefile(file)
-        if not os.path.exists(cachefile):
+        if not os.path.exists(cachefile) or os.path.getsize(cachefile) <= 0:
             return None
 
         # show last line (that contains status)
@@ -131,7 +131,7 @@ class LintPkg:
     def print_stats(self, file = None):
         if file:
             (dirname, filename) = os.path.split(file)
-            print("\r\033[0K%d packages and %d specfiles checked; %d errors, %d warnings. [%s]" % (self.packages, self.specfiles, self.errors, self.warnings, filename),, file=self.outstream)
+            print("\r\033[0K%d packages and %d specfiles checked; %d errors, %d warnings. [%s]" % (self.packages, self.specfiles, self.errors, self.warnings, filename), file=self.outstream)
         else:
             print("\r\033[0K%d packages and %d specfiles checked; %d errors, %d warnings." % (self.packages, self.specfiles, self.errors, self.warnings), file=self.outstream)
         sys.stdout.flush()
This page took 0.028649 seconds and 4 git commands to generate.