Commit c4e1dbcb authored by owsla's avatar owsla

Do something sensible if we get an IOError while logging an exception.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@818 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent eedc7519
New in v1.1.12 (????/??/??)
---------------------------
Do something sensible if we get an IOError while trying to appropriately
log another exception. (Andrew Ferguson)
Handle exception when get permission denied on a file while trying
to establish case sensitivity on read-only side. (Andrew Ferguson)
......
......@@ -186,7 +186,12 @@ class Logger:
logging_func = self.log_to_term
if verbosity >= self.term_verbosity: return
logging_func(self.exception_to_string(), verbosity)
exception_string = self.exception_to_string()
try:
logging_func(exception_string, verbosity)
except IOError:
print "IOError while trying to log exception!"
print exception_string
Log = Logger()
......
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