Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jul 19, 2016
1 parent 037d253 commit 84ebf2d
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions utils/python/CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ def get_values(self, item, attribute=None, resolved=True, subgroup=None):

nodes = [] # List of identified xml elements
results = [] # List of identified parameters


# Find all nodes with attribute name and attribute value item
# xpath .//*[name='item']
# for job in self.get_nodes("job") :

groups = self.get_nodes("group")

for group in groups :
Expand All @@ -122,14 +122,14 @@ def get_values(self, item, attribute=None, resolved=True, subgroup=None):
# seach in all entry nodes
for node in nodes:


# Build return structure
attr = node.get('id')
group_name = None

# determine group
if (root.tag == "job") :
group_name = root.get('name')
group_name = root.get('name')
else:
group_name = root.get('id')

Expand All @@ -141,9 +141,9 @@ def get_values(self, item, attribute=None, resolved=True, subgroup=None):

tmp = { 'group' : group_name , 'attribute' : attr , 'value' : val , 'type' : attribute_type , 'description' : desc , 'default' : default , 'file' : filename}
logger.debug("Found node with value for %s = %s" , item , tmp )

# add single result to list
results.append(tmp)
results.append(tmp)

logger.debug("(get_values) Return value: %s" , results )

Expand Down Expand Up @@ -325,9 +325,9 @@ def get_submit_args(self, case, job):
val = case.get_value(name,subgroup=job)
if val is None:
val = case.get_resolved_value(name)

if val is not None and len(val) > 0 and val != "None":
# Try to evaluate val
# Try to evaluate val
try:
rval = eval(val)
except:
Expand Down Expand Up @@ -431,14 +431,6 @@ def submit_single_job(self, case, job, depid=None, no_batch=False):
for string in (batchsubmit, submitargs, batchredirect, job):
if string is not None:
submitcmd += string + " "

# if case.get_value("MACH") == "mira":
# if job in ("case.test", "case.run"):
# if os.path.isfile(".original_host"):
# with open(".original_host", "r") as fd:
# sshhost = fd.read()
# submitcmd = "ssh %s `%s`"%(sshhost, submitcmd)


logger.info("Submitting job script %s"%submitcmd)
output = run_cmd(submitcmd)
Expand Down

0 comments on commit 84ebf2d

Please sign in to comment.