From 107095db1974df4ae1fab0f09d624073219042f7 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Mon, 21 May 2018 15:06:21 +0900 Subject: bgp_confederation_test: Improve pylint result Also removes a debug print Signed-off-by: IWASE Yusuke --- test/scenario_test/bgp_confederation_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/scenario_test/bgp_confederation_test.py b/test/scenario_test/bgp_confederation_test.py index 26de33f6..f50aa28e 100644 --- a/test/scenario_test/bgp_confederation_test.py +++ b/test/scenario_test/bgp_confederation_test.py @@ -14,6 +14,7 @@ # limitations under the License. from __future__ import absolute_import +from __future__ import print_function import sys import time @@ -51,7 +52,7 @@ class GoBGPTestBase(unittest.TestCase): # | | +-----+ | | +-----+ | | # | +---------+ +---------+ | # +-----------------------------+ - + gobgp_ctn_image_name = parser_option.gobgp_image base.TEST_PREFIX = parser_option.test_prefix @@ -107,9 +108,9 @@ class GoBGPTestBase(unittest.TestCase): time.sleep(self.initial_wait_time) routes = [] - for i in range(60): + for _ in range(60): routes = self.quaggas['q1'].get_global_rib('10.0.0.0/24') - if len(routes) > 0: + if routes: break time.sleep(1) self.failIf(len(routes) == 0) @@ -126,9 +127,8 @@ class GoBGPTestBase(unittest.TestCase): self.quaggas['q1'].add_route('10.0.0.0/24') routes = [] - for i in range(60): + for _ in range(60): routes = self.gobgp.get_global_rib('10.0.0.0/24') - print(routes) if len(routes) == 1: if len(routes[0]['paths']) == 2: break @@ -150,7 +150,7 @@ class GoBGPTestBase(unittest.TestCase): if __name__ == '__main__': output = local("which docker 2>&1 > /dev/null ; echo $?", capture=True) if int(output) is not 0: - print "docker not found" + print("docker not found") sys.exit(1) nose.main(argv=sys.argv, addplugins=[OptionParser()], -- cgit v1.2.3