Author: gnichols
Date: 2012-03-16 16:38:07 +0000 (Fri, 16 Mar 2012)
New Revision: 1227
Modified:
trunk/v7/controller.py
Log:
748753 - Unicode decode error in /var/log/messages
Modified: trunk/v7/controller.py
===================================================================
--- trunk/v7/controller.py 2012-03-16 16:36:57 UTC (rev 1226)
+++ trunk/v7/controller.py 2012-03-16 16:38:07 UTC (rev 1227)
@@ -25,15 +25,17 @@
from v7.commandLineUI import CommandLineUI
+from v7.tags import Constants
class Controller:
- def __init__(self):
+ def __init__(self, debug=Constants.off):
self.ui = CommandLineUI()
self.systemLogMarker = "v7/runtests"
self.systemLogBootMarker = "kernel: Linux version"
-
+ self.debug = debug
+
def removeDirectory(self, dir):
"Remove a directory (and all its contents)"
try:
@@ -86,7 +88,8 @@
if l.find(endMark) >= 0:
break
except UnicodeDecodeError, error:
- print "Warning: Unicode decode error in %s" % syslog
+ if self.debug != Constants.off:
+ print "Warning: Unicode decode error in %s" % syslog
print error
# if we can't decode it, skip the whole line
continue
Show replies by date