Skip to content

Commit

Permalink
another type conv problem
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Oct 10, 2017
1 parent 6355cd8 commit 90ddf5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/lib/CIME/SystemTests/ers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _ers_second_phase(self):
stop_n = self._case.get_value("STOP_N")
stop_option = self._case.get_value("STOP_OPTION")

rest_n = stop_n/2 + 1
rest_n = int(stop_n/2 + 1)
stop_new = stop_n - rest_n
expect(stop_new > 0, "ERROR: stop_n value {:d} too short {:d} {:d}".format(stop_new,stop_n,rest_n))

Expand Down
9 changes: 5 additions & 4 deletions scripts/lib/CIME/SystemTests/system_tests_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import CIME.build as build

import shutil, glob, gzip, time, traceback
import shutil, glob, gzip, time, traceback, six

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -239,10 +239,11 @@ def _coupler_log_indicates_run_complete(self):
allgood = len(newestcpllogfiles)
for cpllog in newestcpllogfiles:
try:
if "SUCCESSFUL TERMINATION" in gzip.open(cpllog, 'rb').read():
if six.b("SUCCESSFUL TERMINATION") in gzip.open(cpllog, 'rb').read():
allgood = allgood - 1
except:
logger.info("{} is not compressed, assuming run failed".format(cpllog))
except BaseException as msg:

logger.info("{} is not compressed, assuming run failed {}".format(cpllog, msg))

return allgood==0

Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/scripts_regression_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def setUp(self):
self._baseline_area = os.path.join(TEST_ROOT, "baselines")
self._testroot = TEST_ROOT
self._hasbatch = MACHINE.has_batch_system() and not NO_BATCH
self._do_teardown = True # Will never do teardown if test failed
self._do_teardown = False # Will never do teardown if test failed

###########################################################################
def tearDown(self):
Expand Down

0 comments on commit 90ddf5b

Please sign in to comment.