summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-08-23 14:00:54 -0700
committerBen Pfaff <blp@nicira.com>2011-08-24 11:57:43 -0700
commit1a98f75260289f72d430abef026c6da2b1d5a255 (patch)
treefff5c2446c4ec540e31fcb4b04961e61d72231eb /python
parent693e5dc7484b15c159cb9f644d28dc759db01b7c (diff)
downloadopenvswitch-1a98f75260289f72d430abef026c6da2b1d5a255.tar.gz
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>
Diffstat (limited to 'python')
-rw-r--r--python/ovs/db/types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py
index 635922f50..f7bc2482b 100644
--- a/python/ovs/db/types.py
+++ b/python/ovs/db/types.py
@@ -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)