Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pylib/System/TestDef.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import datetime
from distutils.spawn import find_executable

is_py2 = sys.version[0] == '2'

# The Test Definition class is mostly a storage construct
# to make it easier when passing values across stages and
# tools.
Expand Down Expand Up @@ -83,8 +85,6 @@ def __convert_value(self, opt, inval):
elif type(opt) is bool:
if type(inval) is bool:
return 0, inval
elif type(inval) is unicode:
return 0, int(inval)
elif type(inval) is str:
if inval.lower() in ['true', '1', 't', 'y', 'yes']:
return 0, True
Expand All @@ -95,6 +95,8 @@ def __convert_value(self, opt, inval):
return 0, False
else:
return 0, True
elif is_py2 and type(inval) is unicode:
return 0, int(inval)
else:
# unknown conversion required
print("Unknown conversion required for " + inval)
Expand Down
5 changes: 4 additions & 1 deletion pylib/Tools/CNC/IPMITool.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

import os
import sys
import Queue
try:
from Queue import *
except:
from queue import *
import threading
from CNCMTTTool import *

Expand Down
3 changes: 2 additions & 1 deletion pylib/Utilities/Environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# $HEADER$
#

from __future__ import print_function
import shutil
import os
from BaseMTTUtility import *
Expand All @@ -27,7 +28,7 @@ def print_name(self):
def print_options(self, testDef, prefix):
lines = testDef.printOptions(self.options)
for line in lines:
print prefix + line
print(prefix + line)
return

def execute(self, log, keyvals, testDef):
Expand Down