diff mx/commands.py @ 7291:a748e4d44694

Truffle API to specify type-specalized Node classes; annotation processor for automatic code generation of the type-specialized Node classes during the build process
author Christian Humer <christian.humer@gmail.com>
date Fri, 21 Dec 2012 10:44:31 -0800
parents a81db08fe930
children 57edf6b07d36
line wrap: on
line diff
--- a/mx/commands.py	Fri Dec 21 10:21:24 2012 +0100
+++ b/mx/commands.py	Fri Dec 21 10:44:31 2012 -0800
@@ -396,7 +396,14 @@
         log = open(logFile, 'w')
     ret = False
     while True:
-        line = stdout.readline().decode(sys.stdout.encoding)
+        
+        # encoding may be None on windows plattforms
+        if sys.stdout.encoding is None:
+            encoding = 'utf-8'
+        else:
+            encoding = sys.stdout.encoding
+        
+        line = stdout.readline().decode(encoding)
         if logFile:
             log.write(line.encode('utf-8'))
         line = line.strip()