Skip to content
Snippets Groups Projects
Commit ba403db8 authored by Eduardo Rodrigues's avatar Eduardo Rodrigues
Browse files

Merge branch 'erodrigu-tests-py3' into 'master'

Fix Phys/DaVinci for Python 3

See merge request !506
parents 5f227f5f 5125f9e0
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!506Fix Phys/DaVinci for Python 3
Pipeline #2354520 passed
......@@ -61,10 +61,9 @@ def option_checker(name, value):
print_allowed_option_values(allowedValues, name)
raise DVOptionError(name, value)
except KeyError:
print set_color(
"red"
) + "You are trying to check the unknown option %s!" % name + set_color(
"plain")
print(set_color("red") +
"You are trying to check the unknown option %s!" % name +
set_color("plain"))
print_allowed_option_values()
......@@ -87,14 +86,14 @@ def print_allowed_option_values(allowedValues, name=None):
Print the allowed values for the DaVinci option configurations.
"""
if name is None:
print set_color(
"green") + "Known job option configurations and allowed values:"
print(set_color("green") +
"Known job option configurations and allowed values:")
for name, values in allowedValues.iteritems():
print "%s \t : %s" % (name, value), set_color("plain")
print("%s \t : %s" % (name, value), set_color("plain"))
else:
print set_color(
"green") + "Allowed values for DaVinci option %s:" % name
print allowedValues[name], set_color("plain")
print(set_color("green") +
"Allowed values for DaVinci option %s:" % name)
print(allowedValues[name], set_color("plain"))
def set_color(key):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment