[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [pytorctl/master] logfile can be unicode too



commit 343931ac548809b8c3e93c5aa6e60a292553ea3d
Author: Tomas Touceda <chiiph@xxxxxxxxxx>
Date:   Fri Feb 25 22:27:23 2011 -0300

    logfile can be unicode too
---
 TorUtil.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/TorUtil.py b/TorUtil.py
index 212788c..27ffdc9 100644
--- a/TorUtil.py
+++ b/TorUtil.py
@@ -339,7 +339,7 @@ def plog(level, msg, *args):
     if not logfile:
       logfile = sys.stdout
     # HACK: if logfile is a string, assume is it the desired filename.
-    if type(logfile) is str:
+    if type(logfile) is str or type(logfile) is unicode:
       f = logging.FileHandler(logfile)
       f.setFormatter(formatter)
       logger.addHandler(f)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits