tracelog: fix hglib import issue
authorTK Soh <teekaysoh@yahoo.com>
Wed, 07 May 2008 00:42:10 +0100
changeset 1160 9557254e63ce
parent 1159 d3567aa402ad
child 1161 fa4bb5ff5dee
tracelog: fix hglib import issue use hglib.toutf() to handle UTF-8 messages, if it's available.
tracelog.py
--- a/tracelog.py	Wed May 07 00:42:10 2008 +0100
+++ b/tracelog.py	Wed May 07 00:42:10 2008 +0100
@@ -13,7 +13,11 @@
 import Queue
 import win32trace
 
-from hglib import toutf
+try:
+    from hggtk.hglib import toutf
+except ImportError:
+    def toutf(s):
+        return s
 
 class TraceLog():
     def __init__(self):