summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-06-14 22:45:20 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-06-14 22:45:20 +0000
commit3b1fc3033d03a2e9278bc7888327886ed5e97232 (patch)
tree87f8b3a2b51d3227bc25cdfed86f6ae689a9b75c /src
parentba05afac4c276ed46f28efc331d9b33ef5920a6d (diff)
downloadbcfg2-3b1fc3033d03a2e9278bc7888327886ed5e97232.tar.gz
bcfg2-3b1fc3033d03a2e9278bc7888327886ed5e97232.tar.bz2
bcfg2-3b1fc3033d03a2e9278bc7888327886ed5e97232.zip
update from mbrady to fix nonexistent group problem
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3311 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rwxr-xr-xsrc/lib/Client/Tools/rpmtools.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/rpmtools.py b/src/lib/Client/Tools/rpmtools.py
index 06c15a2d1..5df6d89a7 100755
--- a/src/lib/Client/Tools/rpmtools.py
+++ b/src/lib/Client/Tools/rpmtools.py
@@ -511,12 +511,18 @@ def rpm_verify_file(fileinfo, rpmlinktos, omitmask):
file_results.append('RPMVERIFY_MTIME')
if flags & RPMVERIFY_USER:
- user = pwd.getpwuid(lstat.st_uid)[0]
+ try:
+ user = pwd.getpwuid(lstat.st_uid)[0]
+ except KeyError:
+ user = None
if not user or not fuser or (user != fuser):
file_results.append('RPMVERIFY_USER')
if flags & RPMVERIFY_GROUP:
- group = grp.getgrgid(lstat.st_gid)[0]
+ try:
+ group = grp.getgrgid(lstat.st_gid)[0]
+ except KeyError:
+ group = None
if not group or not fgroup or (group != fgroup):
file_results.append('RPMVERIFY_GROUP')