diff options
author | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-12-18 21:49:02 +0000 |
---|---|---|
committer | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-12-18 21:49:02 +0000 |
commit | 0df373916228ec5bc7d9943163d541bba8046417 (patch) | |
tree | 47932e8206f8531194c2b1b3beafa51074a84aae | |
parent | c9ee7f5cf2860c48195b6d17a7449dce4ed6caf0 (diff) | |
download | rdiff-backup-0df373916228ec5bc7d9943163d541bba8046417.tar.gz |
Print a more helpful error message if we cannot write to the backup
destination.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@971 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r-- | rdiff-backup/CHANGELOG | 3 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/Main.py | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index f2ac288..22fca75 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.2.3 (????/??/??) --------------------------- +Print a more helpful error message if we cannot write to the backup +destination. (Andrew Ferguson) + Add ETIMEDOUT to the list of recoverable errors; when irrecoverable, a ConnectionError is raised. Closes Ubuntu bug #304659. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 9ba0dce..f522a1d 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -441,7 +441,21 @@ option.""" % rpout.path) elif check_failed_initial_backup(): fix_failed_initial_backup() - if not Globals.rbdir.lstat(): Globals.rbdir.mkdir() + if not Globals.rbdir.lstat(): + try: + Globals.rbdir.mkdir() + except IOError, exc: + Log.FatalError( +"""Could not create rdiff-backup directory + +%s + +due to + +%s + +Please check that the rdiff-backup user can create files and directories in the +destination directory: %s""" % (Globals.rbdir.path, exc, rpout.path)) SetConnections.UpdateGlobal('rbdir', Globals.rbdir) def backup_warn_if_infinite_regress(rpin, rpout): |