mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
ovs.db.types: Use .append instead of += for adding to lists.
Python does not do a good job of appending lists to lists. Suggested-by: Reid Price <reid@nicira.com>
This commit is contained in:
@@ -510,14 +510,14 @@ class Type(object):
|
|||||||
keyConstraints = self.key.constraintsToEnglish(escapeLiteral)
|
keyConstraints = self.key.constraintsToEnglish(escapeLiteral)
|
||||||
if keyConstraints:
|
if keyConstraints:
|
||||||
if self.value:
|
if self.value:
|
||||||
constraints += ['key ' + keyConstraints]
|
constraints.append('key %s' % keyConstraints)
|
||||||
else:
|
else:
|
||||||
constraints += [keyConstraints]
|
constraints.append(keyConstraints)
|
||||||
|
|
||||||
if self.value:
|
if self.value:
|
||||||
valueConstraints = self.value.constraintsToEnglish(escapeLiteral)
|
valueConstraints = self.value.constraintsToEnglish(escapeLiteral)
|
||||||
if valueConstraints:
|
if valueConstraints:
|
||||||
constraints += ['value ' + valueConstraints]
|
constraints.append('value %s' % valueConstraints)
|
||||||
|
|
||||||
return ', '.join(constraints)
|
return ', '.join(constraints)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user