index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Xavier Chantry <shiningxc@gmail.com> | 2009-07-17 19:33:13 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-07-20 10:12:26 -0500 |
commit | a3ecbec6b584b3595c041850e4c8bf242f7ce74a (patch) | |
tree | 82b831c9c35f70bc136278dd0fb7f0079d74b31b | |
parent | 8ebc07744ac58ed1e42af3a52d998587fca85f8b (diff) |
-rwxr-xr-x | pactest/pmrule.py | 7 |
diff --git a/pactest/pmrule.py b/pactest/pmrule.py index ea3ad333..e7c9c44f 100755 --- a/pactest/pmrule.py +++ b/pactest/pmrule.py @@ -116,9 +116,12 @@ class pmrule: if not f.ismodified(): success = 0 elif case == "MODE": - mode = os.lstat(filename)[ST_MODE] - if int(value,8) != S_IMODE(mode): + if not os.path.isfile(filename): success = 0 + else: + mode = os.lstat(filename)[ST_MODE] + if int(value,8) != S_IMODE(mode): + success = 0 elif case == "TYPE": if value == "dir": if not os.path.isdir(filename): |