aboutsummaryrefslogtreecommitdiffstats
path: root/share/ConfigFile.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/ConfigFile.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/ConfigFile.py')
-rw-r--r--share/ConfigFile.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/share/ConfigFile.py b/share/ConfigFile.py
index 98b32a6..40ee8f6 100644
--- a/share/ConfigFile.py
+++ b/share/ConfigFile.py
@@ -62,7 +62,7 @@ def move(old, new):
try:
os.rename(old, new)
except:
- error('rename %s %s: %s' % (old, new, sys.exc_value[0]))
+ error('rename %s %s: %s' % (old, new, str(sys.exc_value)))
class ConfigFile:
def __init__(self, path, suffix=None, meta=all_files):
@@ -137,7 +137,7 @@ class ConfigFile:
try:
os.unlink(self.path)
except:
- error('unlink %s: %s' % (self.path, sys.exc_value[0]))
+ error('unlink %s: %s' % (self.path, str(sys.exc_value)))
log(_('deleted %s') % (self.path,))
elif self.is_modified:
content = string.join(self.lines, "\n")
@@ -150,13 +150,13 @@ class ConfigFile:
try:
os.utime(self.path, None)
except:
- error('utime %s: %s' % (self.path, sys.exc_value[0]))
+ error('utime %s: %s' % (self.path, str(sys.exc_value)))
elif self.suffix and os.path.exists(self.path + self.suffix):
move(self.path + self.suffix, self.path)
try:
os.utime(self.path, None)
except:
- error('utime %s: %s' % (self.path, sys.exc_value[0]))
+ error('utime %s: %s' % (self.path, str(sys.exc_value)))
else:
self.lines = []
self.is_modified = 1
@@ -175,13 +175,13 @@ class ConfigFile:
try:
os.unlink(self.path)
except:
- error('unlink %s: %s' % (self.path, sys.exc_value[0]))
+ error('unlink %s: %s' % (self.path, str(sys.exc_value)))
log(_('deleted %s') % (self.path,))
if not done:
try:
os.symlink(self.sym_link, self.path)
except:
- error('symlink %s %s: %s' % (self.sym_link, self.path, sys.exc_value[0]))
+ error('symlink %s %s: %s' % (self.sym_link, self.path, str(sys.exc_value)))
log(_('made symbolic link from %s to %s') % (self.sym_link, self.path))
if self.is_moved: