aboutsummaryrefslogtreecommitdiffstats
path: root/share/Perms.py
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-05-31 03:34:28 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-05-31 03:34:28 +0000
commit5acda20fb9deb8bef0476186b970cde5e213abd0 (patch)
tree4d5cd132b38898c3f8c82798874a710e612be46a /share/Perms.py
parent33757af4e91c5558b71e6e6a4a99689fb57da06e (diff)
downloadmsec-5acda20fb9deb8bef0476186b970cde5e213abd0.tar
msec-5acda20fb9deb8bef0476186b970cde5e213abd0.tar.gz
msec-5acda20fb9deb8bef0476186b970cde5e213abd0.tar.bz2
msec-5acda20fb9deb8bef0476186b970cde5e213abd0.tar.xz
msec-5acda20fb9deb8bef0476186b970cde5e213abd0.zip
report more complete error messages.
Diffstat (limited to 'share/Perms.py')
-rwxr-xr-xshare/Perms.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/Perms.py b/share/Perms.py
index 7069831..2f7216d 100755
--- a/share/Perms.py
+++ b/share/Perms.py
@@ -145,19 +145,19 @@ def act():
try:
os.chmod(f, newperm)
except:
- error('chmod %s %o: %s' % (f, newperm, sys.exc_value[0]))
+ error('chmod %s %o: %s' % (f, newperm, str(sys.exc_value)))
if user != -1 and user != uid:
log(_('changed owner of %s from %s to %s') % (f, get_user_name(uid), user_str))
try:
os.chown(f, user, -1)
except:
- error('chown %s %s: %s' % (f, user, sys.exc_value[0]))
+ error('chown %s %s: %s' % (f, user, str(sys.exc_value)))
if group != -1 and group != gid:
log(_('changed group of %s from %s to %s') % (f, get_group_name(gid), group_str))
try:
os.chown(f, -1, group)
except:
- error('chgrp %s %s: %s' % (f, group, sys.exc_value[0]))
+ error('chgrp %s %s: %s' % (f, group, str(sys.exc_value)))
def chmod(f, newperm):
try:
@@ -177,7 +177,7 @@ def chmod(f, newperm):
try:
os.chmod(f, newperm)
except:
- error('chmod %s %o: %s' % (f, newperm, sys.exc_value[0]))
+ error('chmod %s %o: %s' % (f, newperm, str(sys.exc_value)))
return 1
if __name__ == '__main__':