Skip to content

Commit

Permalink
Fix LGTM warning
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Sun <stephens@mellanox.com>
  • Loading branch information
Stephen Sun committed Jul 17, 2020
1 parent e16a8e7 commit 955eac2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions scripts/mellanox_db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,6 @@ def mlnx_migrate_buffer_pool_size(self, old_version, new_version):
"""
To migrate buffer pool configuration
"""
buffer_pool_conf_in_db = {}
device_data = self.configDB.get_table('DEVICE_METADATA')
if 'localhost' in device_data.keys():
platform = device_data['localhost']['platform']
else:
log_error("Trying to get DEVICE_METADATA from DB but doesn't exist, skip migration")
return False

# Buffer pools defined in old version
old_default_buffer_pools = self.mlnx_default_buffer_parameters(old_version, "buffer_pool_list")

Expand Down Expand Up @@ -258,7 +250,7 @@ def mlnx_migrate_buffer_pool_size(self, old_version, new_version):
log_info("Checking old pool configuration {}".format(old_config_name))
if buffer_pool_conf_in_db == old_config:
new_config_name = old_config_name
log_info("Old buffer pool configuration {} will be migrate to new one".format(old_config_name, new_config_name))
log_info("Old buffer pool configuration {} will be migrate to new one".format(old_config_name))
break

if not new_config_name:
Expand Down

0 comments on commit 955eac2

Please sign in to comment.