msger.py: avoid the trick caused by stream default parameter
authorGui Chen <gui.chen@intel.com>
Fri, 9 Dec 2011 07:02:03 +0000 (15:02 +0800)
committerGui Chen <gui.chen@intel.com>
Fri, 9 Dec 2011 07:02:03 +0000 (15:02 +0800)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/msger.py

index b33f1a3..631630b 100644 (file)
@@ -60,8 +60,11 @@ CATCHERR_BUFFILE_FD = -1
 CATCHERR_BUFFILE_PATH = None
 CATCHERR_SAVED_2 = -1
 
-def _general_print(head, color, msg = None, stream = sys.stdout, level = 'normal'):
+def _general_print(head, color, msg = None, stream = None, level = 'normal'):
     global LOG_CONTENT
+    if not stream:
+        stream = sys.stdout
+
     if LOG_LEVELS[level] > LOG_LEVEL:
         # skip
         return