From 3141489e9ee0499a80e33acaee6f411b7d4db4e2 Mon Sep 17 00:00:00 2001 From: Dongcan Ye Date: Sun, 6 Dec 2015 12:56:17 +0800 Subject: [PATCH] Using substitution for Python String This patch using String substitution instead of String concatenation. Change-Id: I1faabeb1943449ae60232e08a842652c86793a45 --- neutron/agent/common/ovs_lib.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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): -- 2.45.2