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-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a98f75260289f72d430abef026c6da2b1d5a255;p=openvswitch 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 635922f5..f7bc2482 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)