Py3: Use six.string_types instead of basestring

This commit is contained in:
Shadab Zafar 2016-05-31 00:49:44 +05:30
parent 769e20f2a9
commit 42f16d5d40
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import os
import abc
import pyparsing as pp
import six
from six.moves import reduce
from netlib.utils import escaped_str_to_bytes, bytes_to_escaped_str
from netlib import human
@ -341,7 +342,7 @@ class OptionsOrValue(_Component):
# it to be canonical. The user can specify a different case by using a
# string value literal.
self.option_used = False
if isinstance(value, basestring):
if isinstance(value, six.string_types):
for i in self.options:
# Find the exact option value in a case-insensitive way
if i.lower() == value.lower():