Skip to content

Commit 3e07b9e

Browse files
authored
Fix init BaseConsoleConn got unexpected param console_device (sonic-net#17170)
what [Fix] Fix init BaseConsoleConn got unexpected param console_device why The PR(sonic-net#16686) introduce a param console_device but not remove before BaseConsoleConn passing to parent class. failure example: File "/var/src/sonic-mgmt/tests/common/connections/console_host.py", line 47, in ConsoleHost return ConsoleTypeMapper[console_type](**params) File "/var/src/sonic-mgmt/tests/common/connections/ssh_console_conn.py", line 35, in __init__ super(SSHConsoleConn, self).__init__(**kwargs) File "/var/src/sonic-mgmt/tests/common/connections/base_console_conn.py", line 51, in __init__ super(BaseConsoleConn, self).__init__(**kwargs) TypeError: __init__() got an unexpected keyword argument 'console_device' how Remove param console_device before BaseConsoleConn passing to parent class. test Verified recover_by_console.py since it used this class, and the script could be executed without init exception. Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
1 parent d4dd8e8 commit 3e07b9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/common/connections/base_console_conn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, **kwargs):
4040
key_to_rm = ['console_username', 'console_password',
4141
'console_host', 'console_port',
4242
'sonic_username', 'sonic_password',
43-
'console_type']
43+
'console_type', 'console_device']
4444
for key in key_to_rm:
4545
if key in kwargs:
4646
del kwargs[key]

0 commit comments

Comments
 (0)