Python 3 compatibility issues were fixed
In 2 places dict.itervalues() was used rather than sis.itervalues(dict) Change-Id: If3b9128ae7aa76af364782ecbec3b81f128cefd4
This commit is contained in:
parent
47957136c7
commit
198f7748df
@ -79,7 +79,7 @@ class FunctionDefinition(object):
|
|||||||
continue
|
continue
|
||||||
keys_to_remove.add(k)
|
keys_to_remove.add(k)
|
||||||
if v.position is not None:
|
if v.position is not None:
|
||||||
for v2 in fd.parameters.itervalues():
|
for v2 in six.itervalues(fd.parameters):
|
||||||
if v2.position is not None and v2.position > v.position:
|
if v2.position is not None and v2.position > v.position:
|
||||||
v2.position -= 1
|
v2.position -= 1
|
||||||
for key in keys_to_remove:
|
for key in keys_to_remove:
|
||||||
@ -186,7 +186,7 @@ class FunctionDefinition(object):
|
|||||||
def insert_parameter(self, name, value_type=None, nullable=None,
|
def insert_parameter(self, name, value_type=None, nullable=None,
|
||||||
alias=None, overwrite=False):
|
alias=None, overwrite=False):
|
||||||
pd = self.set_parameter(name, value_type, nullable, alias, overwrite)
|
pd = self.set_parameter(name, value_type, nullable, alias, overwrite)
|
||||||
for p in self.parameters.itervalues():
|
for p in six.itervalues(self.parameters):
|
||||||
if p is pd:
|
if p is pd:
|
||||||
continue
|
continue
|
||||||
if p.position is not None and p.position >= pd.position:
|
if p.position is not None and p.position >= pd.position:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user