diff --git a/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py b/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py index ae028875..8e9e89fd 100755 --- a/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py +++ b/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py @@ -15,6 +15,7 @@ import json import logging import os +import six import subprocess import sys import yaml @@ -99,7 +100,7 @@ def main(argv=sys.argv): if key in ['environment', 'volumes', 'volumes_from']: for value in config[container][key]: # Somehow the lists get empty values sometimes - if type(value) is unicode and not value.strip(): + if type(value) is six.text_type and not value.strip(): continue cmd.append(docker_arg_map(key, value)) elif key == 'image': diff --git a/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py b/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py index 41219efb..0ccd51a4 100755 --- a/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py +++ b/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py @@ -17,6 +17,7 @@ import dpath import json import logging import os +import six import subprocess import sys import yaml @@ -87,7 +88,7 @@ def main(argv=sys.argv): for value in dpath.util.values(config, '*/env_file'): if isinstance(value, list): compose_env_files.extend(value) - elif isinstance(value, basestring): + elif isinstance(value, six.string_types): compose_env_files.extend([value]) input_env_files = {} diff --git a/hot/software-config/elements/heat-config/os-refresh-config/configure.d/55-heat-config b/hot/software-config/elements/heat-config/os-refresh-config/configure.d/55-heat-config index 9cc0df15..cbb36ae1 100755 --- a/hot/software-config/elements/heat-config/os-refresh-config/configure.d/55-heat-config +++ b/hot/software-config/elements/heat-config/os-refresh-config/configure.d/55-heat-config @@ -21,6 +21,7 @@ import subprocess import sys import requests +import six HOOKS_DIR_PATHS = ( os.environ.get('HEAT_CONFIG_HOOKS'), @@ -93,7 +94,7 @@ def invoke_hook(c, log): hot_inputs = c.get('inputs', []) for hot_input in hot_inputs: if hot_input.get('type', None) == 'String' and \ - not isinstance(hot_input['value'], basestring): + not isinstance(hot_input['value'], six.text_type): hot_input['value'] = str(hot_input['value']) iv = dict((i['name'], i['value']) for i in c['inputs']) # The group property indicates whether it is softwarecomponent or