Skip to content

Commit

Permalink
Merge pull request #402 from billsacks/do_not_get_cwd_in_arg_default
Browse files Browse the repository at this point in the history
Do not get cwd in arg defaults
  • Loading branch information
jedwards4b authored Aug 16, 2016
2 parents cdb9fb2 + f210e1c commit f95584b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion utils/python/CIME/check_lockedfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@

import glob

def check_lockedfiles(caseroot=os.getcwd()):
def check_lockedfiles(caseroot=None):
"""
Check that all lockedfiles match what's in case
If caseroot is not specified, it is set to the current working directory
"""
if caseroot is None:
caseroot = os.getcwd()
lockedfiles = glob.glob(os.path.join(caseroot, "LockedFiles", "*.xml"))
for lfile in lockedfiles:
fpart = os.path.basename(lfile)
Expand Down
9 changes: 8 additions & 1 deletion utils/python/CIME/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ def _test_helper2(file_contents, wait_for_run=False, check_throughput=False, che

class TestStatus(object):

def __init__(self, test_dir=os.getcwd(), test_name=None):
def __init__(self, test_dir=None, test_name=None):
"""
Create a TestStatus object
If test_dir is not specified, it is set to the current working directory
"""
if test_dir is None:
test_dir = os.getcwd()
self._filename = os.path.join(test_dir, TEST_STATUS_FILENAME)
self._phase_statuses = OrderedDict() # {name -> (status, comments)}
self._test_name = test_name
Expand Down

0 comments on commit f95584b

Please sign in to comment.