Skip to content

Commit

Permalink
create_newcase works
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Oct 10, 2017
1 parent 67c6269 commit c536f4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/lib/CIME/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from copy import deepcopy
import glob, os, shutil, math
from CIME.XML.standard_module_setup import *

from CIME.six.moves import input
from CIME.utils import expect, get_cime_root, append_status
from CIME.utils import convert_to_type, get_model, get_project
from CIME.utils import get_current_commit, check_name
Expand Down
5 changes: 3 additions & 2 deletions scripts/lib/CIME/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging, gzip, sys, os, time, re, shutil, glob, string, random, imp, errno, signal
import stat as statlib
import warnings
from CIME import six
from contextlib import contextmanager

# Return this error code if the scripts worked but tests failed
Expand Down Expand Up @@ -856,9 +857,9 @@ def convert_to_string(value, type_str=None, vid=""):
"""
if value is not None and type(value) is not str:
if type_str == "char":
expect(type(value) is str, "Wrong type for entry id '{}'".format(vid))
expect(isinstance(value, six.string_types), "Wrong type for entry id '{}'".format(vid))
elif type_str == "integer":
expect(type(value) is int, "Wrong type for entry id '{}'".format(vid))
expect(isinstance(value, six.integer_types), "Wrong type for entry id '{}'".format(vid))
value = str(value)
elif type_str == "logical":
expect(type(value) is bool, "Wrong type for entry id '{}'".format(vid))
Expand Down

0 comments on commit c536f4f

Please sign in to comment.