Rev 17: Log failed imports rather than just printing them. in http://bzr.arbash-meinel.com/plugins/service
John Arbash Meinel
john at arbash-meinel.com
Mon Apr 9 17:17:21 BST 2007
At http://bzr.arbash-meinel.com/plugins/service
------------------------------------------------------------
revno: 17
revision-id: john at arbash-meinel.com-20070409161711-a7yu2foo5k3s2oeu
parent: john at arbash-meinel.com-20070409161447-bx0ejor36p9vmafm
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: service
timestamp: Mon 2007-04-09 11:17:11 -0500
message:
Log failed imports rather than just printing them.
modified:
service.py service.py-20070405221539-6zh4ehzyz16xp8h4-1
-------------- next part --------------
=== modified file 'service.py'
--- a/service.py 2007-04-09 16:14:47 +0000
+++ b/service.py 2007-04-09 16:17:11 +0000
@@ -24,7 +24,10 @@
import struct
import sys
-from bzrlib import osutils
+from bzrlib import (
+ osutils,
+ trace,
+ )
class BzrRequestHandler(StreamRequestHandler):
@@ -306,12 +309,13 @@
'xml_serializer',
]
+
def load_all_bzrlib():
def try_import(name):
try:
__import__(name)
except Exception, inst:
- print type(inst), inst
+ trace.note('failed to import %s: %s %s', name, type(inst), inst)
pass
for mod in find_bzrlib_modules():
More information about the bazaar-commits
mailing list