summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-08 02:32:56 -0500
committerDan McGee <dan@archlinux.org>2011-06-08 02:48:52 -0500
commitbeffab02c41251d4d05d29c0eebbe5a6b6997095 (patch)
tree063b8bc036cc776106dc5e8c77619c34f9ea37f1
parent2668782db282130bc1f845173228371d3447e4a2 (diff)
downloadpacman-beffab02c41251d4d05d29c0eebbe5a6b6997095.tar.xz
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 <dan@archlinux.org>
-rwxr-xr-xtest/pacman/pmpkg.py4
1 files changed, 2 insertions, 2 deletions
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 @@ class pmpkg(object):
"pre_remove": "",
"post_remove": "",
"pre_upgrade": "",
- "post_upgrade": ""
+ "post_upgrade": "",
}
def __str__(self):
@@ -134,7 +134,7 @@ class pmpkg(object):
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