fix msg NoneType issue, causing exit after install
authorGui Chen <gui.chen@intel.com>
Wed, 8 Feb 2012 10:16:58 +0000 (18:16 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Wed, 8 Feb 2012 10:34:30 +0000 (18:34 +0800)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/msger.py

index f3780e4..5dc758f 100644 (file)
@@ -82,7 +82,7 @@ def _general_print(head, color, msg = None, stream = None, level = 'normal'):
         if errormsg:
             LOG_CONTENT += errormsg
 
-        save_msg = msg.strip()
+        save_msg = msg.strip() if msg else None
         if save_msg:
             global HOST_TIMEZONE
             timestr = time.strftime("[%m/%d %H:%M:%S] ",