From c287b3a562d095f92797f968d641ecd45005679f Mon Sep 17 00:00:00 2001 From: mprabhu Date: Tue, 15 Dec 2020 23:21:00 -0800 Subject: [PATCH] Fix to use format instead of str for concatenation --- sonic-chassisd/scripts/chassisd | 2 +- sonic-chassisd/tests/mock_platform.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sonic-chassisd/scripts/chassisd b/sonic-chassisd/scripts/chassisd index d82fac240..355382911 100644 --- a/sonic-chassisd/scripts/chassisd +++ b/sonic-chassisd/scripts/chassisd @@ -259,7 +259,7 @@ class ModuleUpdater(logger.Logger): if module.get_slot() != self.supervisor_slot: continue - module_key = try_get(module.get_name, default='MODULE {}'+str(index)) + module_key = try_get(module.get_name, default='MODULE {}'.format(index)) midplane_ip = try_get(module.get_midplane_ip, default=INVALID_IP) midplane_access = try_get(module.is_midplane_reachable, default=False) diff --git a/sonic-chassisd/tests/mock_platform.py b/sonic-chassisd/tests/mock_platform.py index e8d6a62ef..44bbf0a00 100644 --- a/sonic-chassisd/tests/mock_platform.py +++ b/sonic-chassisd/tests/mock_platform.py @@ -61,7 +61,7 @@ def set_midplane_ip(self): if self.supervisor_slot == self.get_slot(): self.midplane_ip = '192.168.1.100' else: - self.midplane_ip = '192.168.1.'+str(self.get_slot()) + self.midplane_ip = '192.168.1.'.format(self.get_slot()) def is_midplane_reachable(self): return self.midplane_access