Fix incompatible code with python3 for tox pep8 test
"tox -e pep8" fails when python3 is used. This patch fixes it. Closes-Bug: #1583984 Change-Id: Idff17f64d2d4789acee08bd98902ae50312ddc92
This commit is contained in:
parent
331968496a
commit
d47747260f
tackerclient
@ -309,7 +309,7 @@ def _merge_args(qCmd, parsed_args, _extra_values, value_specs):
|
||||
if isinstance(arg_value, list):
|
||||
if value and isinstance(value, list):
|
||||
if (not arg_value or
|
||||
type(arg_value[0]) == type(value[0])):
|
||||
isinstance(arg_value[0], type(value[0]))):
|
||||
arg_value.extend(value)
|
||||
_extra_values.pop(key)
|
||||
|
||||
|
@ -20,7 +20,7 @@ import contextlib
|
||||
import cStringIO
|
||||
import fixtures
|
||||
import mox
|
||||
from six import iteritems
|
||||
import six
|
||||
import sys
|
||||
import testtools
|
||||
|
||||
@ -112,7 +112,7 @@ class MyComparator(mox.Comparator):
|
||||
def _com_dict(self, lhs, rhs):
|
||||
if len(lhs) != len(rhs):
|
||||
return False
|
||||
for key, value in iteritems(lhs):
|
||||
for key, value in lhs.items():
|
||||
if key not in rhs:
|
||||
return False
|
||||
rhs_value = rhs[key]
|
||||
@ -304,7 +304,7 @@ class CLITestV10Base(testtools.TestCase):
|
||||
args.append("--tag")
|
||||
for tag in tags:
|
||||
args.append(tag)
|
||||
if isinstance(tag, unicode):
|
||||
if isinstance(tag, six.string_types):
|
||||
tag = urllib.quote(tag.encode('utf-8'))
|
||||
if query:
|
||||
query += "&tag=" + tag
|
||||
|
Loading…
x
Reference in New Issue
Block a user