Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=9ccb3ae21d1c9b514c5e8e827538521672f5b574
commit 9ccb3ae21d1c9b514c5e8e827538521672f5b574 Author: Michel Hermier <[email protected]> Date: Thu Dec 19 16:04:35 2013 +0100 pactest: if result is altered no need to continue to loop. diff --git a/pactest/pmrule.py b/pactest/pmrule.py index 15f9e1a..d956b73 100644 --- a/pactest/pmrule.py +++ b/pactest/pmrule.py @@ -93,11 +93,12 @@ class pmrule: if not value in newpkg.files: self.result = FAILURE elif case == "BACKUP": - found = 0 + found = False for f in newpkg.backup: name, md5sum = f.split("\t") if value == name: - found = 1 + found = True + break if not found: self.result = FAILURE else: @@ -113,6 +114,7 @@ class pmrule: if f.name == key: if not f.ismodified(): self.result = FAILURE + break elif case == "PACNEW": if not os.path.isfile("%s%s" % (filename, PM_PACNEW)): self.result = FAILURE _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
