[projects/pld-ftp-admin] Fix syntax and don't try to read empty cache
baggins
baggins at pld-linux.org
Sun Jan 17 19:20:03 CET 2021
commit 434e50be88b605c132f7ad5b7f73e5cfedb61d66
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jan 17 19:19:20 2021 +0100
Fix syntax and don't try to read empty cache
bin/pfa-lintpkg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/bin/pfa-lintpkg b/bin/pfa-lintpkg
index 716cd88..5124a3c 100755
--- a/bin/pfa-lintpkg
+++ b/bin/pfa-lintpkg
@@ -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()
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/434e50be88b605c132f7ad5b7f73e5cfedb61d66
More information about the pld-cvs-commit
mailing list