From ec8094b9d2a51941382b8b994db2534a4e09c006 Mon Sep 17 00:00:00 2001 From: Lukas Pramuk Date: Wed, 17 Apr 2024 21:05:41 +0200 Subject: [PATCH] Fix getting exit code on capsule tunnel error (#14821) (cherry picked from commit 625017b1fd6300898d8f94ad421912098aa500a7) --- robottelo/host_helpers/satellite_mixins.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/robottelo/host_helpers/satellite_mixins.py b/robottelo/host_helpers/satellite_mixins.py index 3c26862c3bf..d20a70d2d15 100644 --- a/robottelo/host_helpers/satellite_mixins.py +++ b/robottelo/host_helpers/satellite_mixins.py @@ -288,10 +288,10 @@ def default_url_on_new_port(self, oldport, newport): post_ncat_procs = self.execute('pgrep ncat').stdout.splitlines() ncat_pid = set(post_ncat_procs).difference(set(pre_ncat_procs)) if not len(ncat_pid): - stderr = channel.get_exit_status()[1] - logger.debug(f'Tunnel failed: {stderr}') + err = channel.get_exit_signal() + logger.debug(f'Tunnel failed: {err}') # Something failed, so raise an exception. - raise CapsuleTunnelError(f'Starting ncat failed: {stderr}') + raise CapsuleTunnelError(f'Starting ncat failed: {err}') forward_url = f'https://{self.hostname}:{newport}' logger.debug(f'Yielding capsule forward port url: {forward_url}') try: