summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdiff-backup/CHANGELOG2
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 00e75af..f6a7057 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -20,6 +20,8 @@ bug#14209: Security bug with --restrict-read-only and
outside path. Bug with --restrict option allowed writes outside path.
(Reported by Charles Duffy.)
+bug #14304: Python 2.2 compatibility spoiled by device files.
+
New in v1.0.0 (2005/08/14)
--------------------------
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index 05249ec..aa411a0 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -1045,8 +1045,10 @@ class RPath(RORPath):
mode = stat.S_IFBLK | 0600
else: raise RPathException
try: self.conn.os.mknod(self.path, mode, self.conn.os.makedev(major, minor))
- except OSError, e:
- if e.errno == errno.EPERM:
+ except (OSError, AttributeError), e:
+ if isinstance(e, AttributeError) or e.errno == errno.EPERM:
+ # AttributeError will be raised by Python 2.2, which
+ # doesn't have os.mknod
log.Log("unable to mknod %s -- using touch instead" % self.path, 4)
self.touch()
self.setdata()