diff options
author | Daniel Watkins <daniel.watkins@canonical.com> | 2019-02-26 15:23:58 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-02-26 15:23:58 +0000 |
commit | f278a8a3dbb1e45e8d83491ad24e41812cb77ddb (patch) | |
tree | c8840c7a6a9199a7c0fa918e2d9459192adc9a9d /cloudinit/util.py | |
parent | f0f09629a924435c223f405bea084401ecb7faa2 (diff) | |
download | vyos-cloud-init-f278a8a3dbb1e45e8d83491ad24e41812cb77ddb.tar.gz vyos-cloud-init-f278a8a3dbb1e45e8d83491ad24e41812cb77ddb.zip |
util: don't determine string_types ourselves
six already provides this for us, and we're already paying the cost to
determine it there; no need to do it twice.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 2be528a0..e5403f7d 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -51,11 +51,6 @@ from cloudinit import version from cloudinit.settings import (CFG_BUILTIN) -try: - string_types = (basestring,) -except NameError: - string_types = (str,) - _DNS_REDIRECT_IP = None LOG = logging.getLogger(__name__) @@ -125,7 +120,7 @@ def target_path(target, path=None): # return 'path' inside target, accepting target as None if target in (None, ""): target = "/" - elif not isinstance(target, string_types): + elif not isinstance(target, six.string_types): raise ValueError("Unexpected input for target: %s" % target) else: target = os.path.abspath(target) |