From: Ben Pfaff Date: Tue, 23 Aug 2011 21:00:54 +0000 (-0700) Subject: ovs.db.types: Use .append instead of += for adding to lists. X-Git-Tag: v1.3.0~405 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1a98f75260289f72d430abef026c6da2b1d5a255;p=sliver-openvswitch.git 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 --- 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)