From beffab02c41251d4d05d29c0eebbe5a6b6997095 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 8 Jun 2011 02:32:56 -0500 Subject: pactest: only create install file if necessary We were testing whether there were any values in the array, rather than looking if the values contained anything. Signed-off-by: Dan McGee --- test/pacman/pmpkg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 42573428..4568adb9 100755 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -63,7 +63,7 @@ def __init__(self, name, version = "1.0-1"): "pre_remove": "", "post_remove": "", "pre_upgrade": "", - "post_upgrade": "" + "post_upgrade": "", } def __str__(self): @@ -134,7 +134,7 @@ def makepkg(self, path): util.mkfile(".PKGINFO", "\n".join(data)) # .INSTALL - if len(self.install.values()) > 0: + if any(self.install.values()): util.mkinstallfile(".INSTALL", self.install) # safely create the dir -- cgit v1.2.3-54-g00ecf