Commit 07fad537 authored by owsla's avatar owsla

More error message improvements


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@976 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 8ae91104
...@@ -444,7 +444,7 @@ option.""" % rpout.path) ...@@ -444,7 +444,7 @@ option.""" % rpout.path)
if not Globals.rbdir.lstat(): if not Globals.rbdir.lstat():
try: try:
Globals.rbdir.mkdir() Globals.rbdir.mkdir()
except IOError, exc: except (OSError, IOError), exc:
Log.FatalError( Log.FatalError(
"""Could not create rdiff-backup directory """Could not create rdiff-backup directory
......
...@@ -707,7 +707,9 @@ class IncrementITRB(PatchITRB): ...@@ -707,7 +707,9 @@ class IncrementITRB(PatchITRB):
self.base_rp, inc_prefix = longname.get_mirror_inc_rps( self.base_rp, inc_prefix = longname.get_mirror_inc_rps(
self.CCPP.get_rorps(index), self.basis_root_rp, self.inc_root_rp) self.CCPP.get_rorps(index), self.basis_root_rp, self.inc_root_rp)
self.base_rp.setdata() self.base_rp.setdata()
assert diff_rorp.isdir() or self.base_rp.isdir() assert diff_rorp.isdir() or self.base_rp.isdir(), \
("Either %s or %s must be a directory" % (repr(diff_rorp.path),
repr(self.base_rp.path)))
if diff_rorp.isdir(): if diff_rorp.isdir():
inc = increment.Increment(diff_rorp, self.base_rp, inc_prefix) inc = increment.Increment(diff_rorp, self.base_rp, inc_prefix)
if inc and inc.isreg(): if inc and inc.isreg():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment