Skip to content

Commit

Permalink
ran 2to3 on scripts directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Oct 10, 2017
1 parent ed89349 commit a4cd19e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion scripts/manage_pes
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class ManagePes(object):
self.print_gridnodes([match])
logger.info(" The new values would be")
self.print_gridnodes([newmatch])
override = raw_input(" Do you want to override the match with"
override = input(" Do you want to override the match with"
" your pe-layout [yes/no] (default is no)\n")
if override.lower() != "y" and override.lower() != "yes":
logger.info("Nothing done.")
Expand Down
28 changes: 14 additions & 14 deletions scripts/query_config
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def print_compset(name, files, all_components=False):
elif config_file is None or not os.path.isfile(config_file):
return

print "\nActive component: {}".format(name)
print("\nActive component: {}".format(name))
# Now parse the compsets file and write out the compset alias and longname as well as the help text
# determine component xml content
compsets = Compsets(config_file)
Expand Down Expand Up @@ -144,7 +144,7 @@ def query_component(name, all_components=False):
expect(config_exists,
"Cannot find config_file {} on disk".format(config_file))
elif all_components and not config_exists:
print "WARNING: Couldn't find config_file {} on disk".format(config_file)
print("WARNING: Couldn't find config_file {} on disk".format(config_file))
return
# If name is not a valid argument - exit with error
expect(match_found,
Expand Down Expand Up @@ -285,10 +285,10 @@ class Machines(CIME.XML.machines.Machines):
if single_machine and machine_name is None:
files = Files()
config_file = files.get_value("MACHINES_SPEC_FILE")
print "Machine is not listed in config file: {}".format(config_file)
print("Machine is not listed in config file: {}".format(config_file))
else: # write out machines
machines = self.get_nodes(nodename="machine")
print "Machine(s)"
print("Machine(s)")
for machine in machines:
name = machine.get("MACH")
desc = machine.find("DESC")
Expand All @@ -300,21 +300,21 @@ class Machines(CIME.XML.machines.Machines):
current_machine = self.probe_machine_name(warn=False)
if not single_machine:
name += " (current)" if current_machine and current_machine in name else ""
print " {} : {} ".format(name, desc.text)
print " os ", os_.text
print " compilers ",compilers.text
print(" {} : {} ".format(name, desc.text))
print(" os ", os_.text)
print(" compilers ",compilers.text)
if MAX_MPITASKS_PER_NODE is not None:
print " pes/node ",MAX_MPITASKS_PER_NODE.text
print(" pes/node ",MAX_MPITASKS_PER_NODE.text)
if max_tasks_per_node is not None:
print " max_tasks/node ",max_tasks_per_node.text
print(" max_tasks/node ",max_tasks_per_node.text)
elif single_machine and machine_name in name:
print " {} : {} ".format(name, desc.text)
print " os ", os_.text
print " compilers ",compilers.text
print(" {} : {} ".format(name, desc.text))
print(" os ", os_.text)
print(" compilers ",compilers.text)
if MAX_MPITASKS_PER_NODE is not None:
print " pes/node ",MAX_MPITASKS_PER_NODE.text
print(" pes/node ",MAX_MPITASKS_PER_NODE.text)
if max_tasks_per_node is not None:
print " max_tasks/node ",max_tasks_per_node.text
print(" max_tasks/node ",max_tasks_per_node.text)

def _main_func(description):
"""
Expand Down
2 changes: 1 addition & 1 deletion scripts/query_testlists
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Usage:
All of the above support the various --xml-* arguments for subsetting which tests are included.
"""
from __future__ import print_function

from Tools.standard_script_setup import *
from CIME.test_utils import get_tests_from_xml, test_to_string
from CIME.XML.tests import Tests
Expand Down

0 comments on commit a4cd19e

Please sign in to comment.