File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1919import pytest
2020from packaging import version
2121from .wrappers import CLI , xapi
22- import traceback
2322
2423logger = logging .getLogger (__name__ )
2524
@@ -297,10 +296,9 @@ def create_ssh_fixture(name):
297296 def _ssh (request ):
298297 try :
299298 ssh = _CLI_wrapper (f"ssh://{ request .getfixturevalue (f'{ name } _hostname' )} " )
300- except Exception :
299+ except Exception as exc :
301300 logging .error ("Failed to create ssh fixture and log in" )
302- traceback .print_exc ()
303- pytest .exit ("SSH fixture failure; terminating session" )
301+ raise exc
304302 if ssh .cli_flavor == "mos" :
305303 ssh .sendcmd ("enable" )
306304 yield ssh
@@ -316,10 +314,9 @@ def _console(request):
316314 # Ignore encoding errors for the console -- various conditions
317315 # cause non-UTF-8 characters to be received.
318316 console = _CLI_wrapper (console_url , ignore_encoding_errors = True )
319- except Exception :
317+ except Exception as exc :
320318 logging .error ("Failed to create console fixture and log in" )
321- traceback .print_exc ()
322- pytest .exit ("Console fixture failure; terminating session" )
319+ raise exc
323320 if console .cli_flavor == "mos" :
324321 console .sendcmd ("enable" )
325322 yield console
You can’t perform that action at this time.
0 commit comments