Skip to content

Commit

Permalink
Fix to use format instead of str for concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
mprabhu-nokia committed Dec 16, 2020
1 parent e91f1a1 commit c287b3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sonic-chassisd/scripts/chassisd
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion sonic-chassisd/tests/mock_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c287b3a

Please sign in to comment.