From a4cd19e249397b8a9b6604e977d872048be2b9da Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 3 Oct 2017 14:14:27 -0600 Subject: [PATCH] ran 2to3 on scripts directory --- scripts/manage_pes | 2 +- scripts/query_config | 28 ++++++++++++++-------------- scripts/query_testlists | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/manage_pes b/scripts/manage_pes index da00c465c56..c366fe0d550 100755 --- a/scripts/manage_pes +++ b/scripts/manage_pes @@ -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.") diff --git a/scripts/query_config b/scripts/query_config index 4b2fb3a6094..889c06e6d9c 100755 --- a/scripts/query_config +++ b/scripts/query_config @@ -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) @@ -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, @@ -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") @@ -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): """ diff --git a/scripts/query_testlists b/scripts/query_testlists index d363df3f564..3f314d868fb 100755 --- a/scripts/query_testlists +++ b/scripts/query_testlists @@ -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