summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-10-23 16:31:09 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-10-23 16:31:09 +0000
commitd6cc49dfd209ad0a6cbb062b76a3e8aadf751ddf (patch)
tree0b0d3e4292953e4c2bd24c58ea402ee0aad4bedb
parentb8c82ccc70c2c4d6131794913ecd20ea7e485e11 (diff)
downloadrdiff-backup-d6cc49dfd209ad0a6cbb062b76a3e8aadf751ddf.tar.gz
Inform the user of which file has failed if an exception occurs during a
rename operation. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@954 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG2
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 0554e38..2a8231f 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,8 @@
New in v1.2.3 (????/??/??)
---------------------------
+Inform the user of which file has failed if an exception occurs during a
+rename operation. (Andrew Ferguson)
New in v1.2.2 (2008/10/19)
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index a75cc0e..e5e19fa 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -255,7 +255,10 @@ def rename(rp_source, rp_dest):
try:
rp_source.conn.os.rename(rp_source.path, rp_dest.path)
except OSError, error:
- if error.errno != errno.EEXIST: raise
+ if error.errno != errno.EEXIST:
+ log.Log("OSError while renaming %s to %s"
+ % (rp_source.path, rp_dest.path), 1)
+ raise
# On Windows, files can't be renamed on top of an existing file
rp_source.conn.os.unlink(rp_dest.path)