mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +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)
|
||||
if keyConstraints:
|
||||
if self.value:
|
||||
constraints += ['key ' + keyConstraints]
|
||||
constraints.append('key %s' % keyConstraints)
|
||||
else:
|
||||
constraints += [keyConstraints]
|
||||
constraints.append(keyConstraints)
|
||||
|
||||
if self.value:
|
||||
valueConstraints = self.value.constraintsToEnglish(escapeLiteral)
|
||||
if valueConstraints:
|
||||
constraints += ['value ' + valueConstraints]
|
||||
constraints.append('value %s' % valueConstraints)
|
||||
|
||||
return ', '.join(constraints)
|
||||
|
||||
|
Reference in New Issue
Block a user