1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

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>
This commit is contained in:
Dan McGee 2011-06-08 02:32:56 -05:00
parent 2668782db2
commit beffab02c4

View File

@ -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