At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 3809
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: jam-integration
timestamp: Sat 2008-11-01 09:44:47 -0500
message:
  Handle when _open_bzr_log returns None.
=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py   2008-10-30 14:18:26 +0000
+++ b/bzrlib/trace.py   2008-11-01 14:44:47 +0000
@@ -230,6 +230,7 @@
     # TODO: What should happen if we fail to open the trace file?  Maybe the
     # objects should be pointed at /dev/null or the equivalent?  Currently
     # returns None which will cause failures later.
+    return None
 
 
 def enable_default_logging():
@@ -250,7 +251,8 @@
                                            timezone='local')
     # create encoded wrapper around stderr
     bzr_log_file = _open_bzr_log()
-    bzr_log_file.write(start_time.encode('utf-8') + '\n')
+    if bzr_log_file is not None:
+        bzr_log_file.write(start_time.encode('utf-8') + '\n')
     push_log_file(bzr_log_file,
         r'[%(process)5d] %(asctime)s.%(msecs)03d %(levelname)s: %(message)s',
         r'%Y-%m-%d %H:%M:%S')

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to