Fix undefined basestring in py35

In py3 basestring is no longer valid, and should use `str` instead.
In order to cover py2 and py3, we change to use six.string_types.
Partial-Bug: #1682015

Change-Id: I2ba279241c64bcab93ecd9eb08081ce580c5f2e9
This commit is contained in:
ricolin 2017-04-12 14:31:00 +08:00
parent dc343a1070
commit 7f57e397b0
1 changed files with 2 additions and 1 deletions

View File

@ -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 = {}