Merge "Replace basestring with six.string_types"

This commit is contained in:
Jenkins 2017-07-11 01:47:47 +00:00 committed by Gerrit Code Review
commit b338f128dd
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ except ImportError:
import simplejson as json
import logging
import re
import six
import sys
import time
@ -375,7 +376,7 @@ ALLOWED_NETWORK_CMDS = {
def network_config(session, args):
"""network config functions"""
cmd = pluginlib.exists(args, 'cmd')
if not isinstance(cmd, basestring):
if not isinstance(cmd, six.string_types):
msg = "invalid command '%s'" % str(cmd)
raise pluginlib.PluginError(msg)
return