index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2008-02-07 20:16:16 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-02-07 20:16:16 -0600 |
commit | bfc024eab3a1d26ba37620175be815cb2eb59606 (patch) | |
tree | 96c1c3d89b0e523364b6b000ef02105ebbd0923e /pactest/pmdb.py | |
parent | 77c3cf9790472592902183354ea5481cffc01f58 (diff) | |
parent | 14ee1be1ef21e09a84f01dc9623e8513218709d4 (diff) |
-rwxr-xr-x | pactest/pmdb.py | 13 |
diff --git a/pactest/pmdb.py b/pactest/pmdb.py index cc852c2a..af392000 100755 --- a/pactest/pmdb.py +++ b/pactest/pmdb.py @@ -119,7 +119,10 @@ class pmdb: # desc filename = os.path.join(path, "desc") - fd = file(filename, "r") + if not os.path.isfile(filename): + print "invalid db entry found (desc missing) for pkg", pkgname + return None + fd = open(filename, "r") while 1: line = fd.readline() if not line: @@ -158,7 +161,10 @@ class pmdb: # files filename = os.path.join(path, "files") - fd = file(filename, "r") + if not os.path.isfile(filename): + print "invalid db entry found (files missing) for pkg", pkgname + return None + fd = open(filename, "r") while 1: line = fd.readline() if not line: @@ -177,6 +183,9 @@ class pmdb: # depends filename = os.path.join(path, "depends") + if not os.path.isfile(filename): + print "invalid db entry found (depends missing) for pkg", pkgname + return None fd = file(filename, "r") while 1: line = fd.readline() |