Skip to content

Commit

Permalink
[db_migrator] Remove import of swsssdk as it is not supported in mast…
Browse files Browse the repository at this point in the history
…er (#2544)

Fixes: sonic-net/sonic-buildimage#12955

The cherrypick changes (from 202012 to master) made as part of #2515
broke the master branch db_migrator. The issue is due to an import of swsssdk which is no longer available in master image.

How I did it
Removed the import statement that came due to cherrypick.

How to verify it
Checked on physical device running master image

Without fix:

root@str2-acs-12:~# db_migrator.py
Traceback (most recent call last):
  File "/usr/local/bin/db_migrator.py", line 11, in <module>
    from swsssdk import ConfigDBConnector, SonicDBConfig
ModuleNotFoundError: No module named 'swsssdk'
root@str2-acs-12:~# 

With fix:

root@str2-acs-12:~# db_migrator.py     
version_4_0_0
root@str2-acs-12:~#
  • Loading branch information
vaibhavhd authored Dec 7, 2022
1 parent 10eb5ba commit 09b8dd1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import re

from sonic_py_common import device_info, logger
from swsssdk import ConfigDBConnector, SonicDBConfig
from swsscommon.swsscommon import SonicV2Connector, ConfigDBConnector, SonicDBConfig
from db_migrator_constants import RESTAPI, TELEMETRY, CONSOLE_SWITCH

Expand Down

0 comments on commit 09b8dd1

Please sign in to comment.