summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-11-12 05:40:01 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-11-12 05:40:01 +0000
commitd397d6072214a785a570b5fb3472c766442f71ed (patch)
treea197c8221ea5f9e021861e37401b70f2fc09fe10
parent94f50f90ca1e048bba054af23d29ee08bb10d8aa (diff)
downloadrdiff-backup-d397d6072214a785a570b5fb3472c766442f71ed.tar.gz
Make sure backup_writer is set before using its logging
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r1-0@683 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/log.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rdiff-backup/rdiff_backup/log.py b/rdiff-backup/rdiff_backup/log.py
index 51793bf..f977420 100644
--- a/rdiff-backup/rdiff_backup/log.py
+++ b/rdiff-backup/rdiff_backup/log.py
@@ -247,7 +247,7 @@ or within one second of each other. Wait a second and try again.""" %
def write_if_open(cls, error_type, rp, exc):
"""Call cls.write(...) if error log open, only log otherwise"""
- if not Globals.isbackup_writer:
+ if not Globals.isbackup_writer and Globals.backup_writer:
return Globals.backup_writer.log.ErrorLog.write_if_open(
error_type, rp, str(exc)) # convert exc bc of exc picking prob
if cls.isopen(): cls.write(error_type, rp, exc)