Reconnect before mochad switch send command (#11296)
* Connection to mochad occasionally stalls on RPi and CM19A. Reconnect one switch send command. * Formatting and exception hanling fixes * Moved import inside the method. Logging outside the try-catch. * Tailing whitespaces. * MockDependency on pymochad in unit tests to resolve exceptions * patch pymochad MochadException in unit tests to resolve exceptions * patch pymochad MochadException in unit tests to resolve exceptions * cleaned unused import * lint issue fixed * pylint issue fixed
This commit is contained in:
parent
8c0035c5b3
commit
2ba9d825a0
2 changed files with 33 additions and 7 deletions
|
@ -16,6 +16,7 @@ def pymochad_mock():
|
|||
"""Mock pymochad."""
|
||||
with mock.patch.dict('sys.modules', {
|
||||
'pymochad': mock.MagicMock(),
|
||||
'pymochad.exceptions': mock.MagicMock(),
|
||||
}):
|
||||
yield
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue