You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test test_BlockUseSwsssdk() failed with the error message "AttributeError: 'module' object has no attribute 'run'".
I think that it runs Python 2.7 when the function 'run' of the subprocess (in line 38) is available only in Python 3.5 and newer
The test test_BlockUseSwsssdk() in the sonic-pyswssdk repo failed with the error message "AttributeError: 'module' object has no attribute 'run'".
I think that when we build build_env buster we run Python 2.7 when the function 'run' of the subprocess (in line 38) is available only in Python 3.5 and newer
The commit that adds the test is: e30a1e1e90e6227a771340edcad727255be54b94
The sonic-buildimage not pointing to the commit that adds the tests yet.
This is the submodule update PR with the failure: #12559
Steps to reproduce the issue:
build with the commit e30a1e1e90e6227a771340edcad727255be54b94 of the sonic-py-swssdk repo with buster build env
Describe the results you received:
build failure
Describe the results you expected:
build succsses
Output of show version:
(paste your output here)
Output of show techsupport:
(paste your output here or download and attach the file here )
Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered:
#### Why I did it
Fix this issue: sonic-net/sonic-buildimage#12558
UT failed under python2: test_BlockUseSwsssdk()
> result = subprocess.run(["python", "-c", "import swsssdk;exit()"], capture_output=True, cwd=swsssdk_path)
E AttributeError: 'module' object has no attribute 'run'
#### How I did it
Update UT to use subprocess.check_output(), which support by both python3 and python2.
#### How to verify it
Pass all UT.
#### Which release branch to backport (provide reason below if selected)
#### Description for the changelog
Fix UT test_BlockUseSwsssdk()
#### Link to config_db schema for YANG module changes
#### A picture of a cute animal (not mandatory but encouraged)
Description
The test test_BlockUseSwsssdk() failed with the error message "AttributeError: 'module' object has no attribute 'run'".
I think that it runs Python 2.7 when the function 'run' of the subprocess (in line 38) is available only in Python 3.5 and newer
The test test_BlockUseSwsssdk() in the sonic-pyswssdk repo failed with the error message "AttributeError: 'module' object has no attribute 'run'".
I think that when we build build_env buster we run Python 2.7 when the function 'run' of the subprocess (in line 38) is available only in Python 3.5 and newer
The commit that adds the test is: e30a1e1e90e6227a771340edcad727255be54b94
The sonic-buildimage not pointing to the commit that adds the tests yet.
This is the submodule update PR with the failure: #12559
Steps to reproduce the issue:
Describe the results you received:
build failure
Describe the results you expected:
build succsses
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: