Replace basestring with six.string_types
openstack/heat-templates has the issue but heat-agents was missing it Change-Id: Id6da9285eeeb12b86164a080271d3f9ba40177dd
This commit is contained in:
parent
637e4260ca
commit
73e2125532
|
@ -20,6 +20,8 @@ import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
# legacy groups that have never had a hook script
|
# legacy groups that have never had a hook script
|
||||||
WHITELISTED_MISSING_HOOK_SCRIPTS = ['os-apply-config']
|
WHITELISTED_MISSING_HOOK_SCRIPTS = ['os-apply-config']
|
||||||
HOOKS_DIR_PATHS = (
|
HOOKS_DIR_PATHS = (
|
||||||
|
@ -93,7 +95,7 @@ def invoke_hook(c, log):
|
||||||
hot_inputs = c.get('inputs', [])
|
hot_inputs = c.get('inputs', [])
|
||||||
for hot_input in hot_inputs:
|
for hot_input in hot_inputs:
|
||||||
if hot_input.get('type', None) == 'String' and \
|
if hot_input.get('type', None) == 'String' and \
|
||||||
not isinstance(hot_input['value'], basestring):
|
not isinstance(hot_input['value'], six.string_types):
|
||||||
hot_input['value'] = str(hot_input['value'])
|
hot_input['value'] = str(hot_input['value'])
|
||||||
iv = dict((i['name'], i['value']) for i in c['inputs'])
|
iv = dict((i['name'], i['value']) for i in c['inputs'])
|
||||||
# The group property indicates whether it is softwarecomponent or
|
# The group property indicates whether it is softwarecomponent or
|
||||||
|
|
Loading…
Reference in New Issue