diff --git a/scripts/lib/CIME/case.py b/scripts/lib/CIME/case.py index 67fdd40cdd7..f3162c1865b 100644 --- a/scripts/lib/CIME/case.py +++ b/scripts/lib/CIME/case.py @@ -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 diff --git a/scripts/lib/CIME/utils.py b/scripts/lib/CIME/utils.py index 4b09cd197ce..5dc1d2f4180 100644 --- a/scripts/lib/CIME/utils.py +++ b/scripts/lib/CIME/utils.py @@ -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 @@ -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))