2
0
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:
Ben Pfaff
2011-08-23 14:00:54 -07:00
parent 693e5dc748
commit 1a98f75260

View File

@@ -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)