import datetime
import gzip
+# Compatibility python 2/3 for input function
+# input stays input for python 3 and input = raw_input for python 2
+try:
+ input = raw_input
+except NameError:
+ pass
+
verbose = False
try:
def ask_a_path():
"""
"""
- path = raw_input("enter a path where to save the result: ")
+ path = input("enter a path where to save the result: ")
if path == "":
- result = raw_input("the result will be not save. Are you sure to "
+ result = input("the result will be not save. Are you sure to "
"continue ? [y/n] ")
if result == "y":
return path
return ask_a_path()
elif os.path.exists(path):
- result = raw_input("Warning, the content of %s will be deleted. Are you"
+ result = input("Warning, the content of %s will be deleted. Are you"
" sure to continue ? [y/n] " % path)
if result == "y":
return path
prod_node.attrib["history_file"] = os.path.basename(xml_history_path)
- prod_node.attrib["global_res"] = retcode
+ prod_node.attrib["global_res"] = str(retcode)
if withappli:
if not first_time:
grids = {}
sessions = {}
for test in tt[testbase]:
- if not grids.has_key(test.grid):
+ if not (test.grid in grids):
if first_time:
mn = add_simple_node(gn, "grid")
mn.attrib['name'] = test.grid
if 'callback' in script:
try:
cnode = add_simple_node(tn, "callback")
- if src.architecture.is_windows():
+ if True: # bug xml mal forme colorisation src.architecture.is_windows():
import string
cnode.text = filter(
lambda x: x in string.printable,
show_desktop = (options.display and options.display.upper() == "NO")
if options.display and options.display != "NO":
remote_name = options.display.split(':')[0]
- if remote_name != "":
+ if remote_name != "" and (not src.architecture.is_windows()):
check_remote_machine(remote_name, logger)
# if explicitly set use user choice
os.environ['DISPLAY'] = options.display