From: Dongcan Ye Date: Sun, 6 Dec 2015 04:56:17 +0000 (+0800) Subject: Using substitution for Python String X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3141489e9ee0499a80e33acaee6f411b7d4db4e2;p=openstack-build%2Fneutron-build.git Using substitution for Python String This patch using String substitution instead of String concatenation. Change-Id: I1faabeb1943449ae60232e08a842652c86793a45 --- diff --git a/neutron/agent/common/ovs_lib.py b/neutron/agent/common/ovs_lib.py index cb652b559..9c5f3d533 100644 --- a/neutron/agent/common/ovs_lib.py +++ b/neutron/agent/common/ovs_lib.py @@ -99,10 +99,11 @@ class VifPort(object): self.switch = switch def __str__(self): - return ("iface-id=" + self.vif_id + ", vif_mac=" + - self.vif_mac + ", port_name=" + self.port_name + - ", ofport=" + str(self.ofport) + ", bridge_name=" + - self.switch.br_name) + return ("iface-id=%s, vif_mac=%s, port_name=%s, ofport=%s, " + "bridge_name=%s") % ( + self.vif_id, self.vif_mac, + self.port_name, self.ofport, + self.switch.br_name) class BaseOVS(object):