Skip to content

Commit

Permalink
Fix getting exit code on capsule tunnel error (#14821)
Browse files Browse the repository at this point in the history
(cherry picked from commit 625017b)
  • Loading branch information
lpramuk authored and web-flow committed Apr 17, 2024
1 parent 10be4d2 commit ec8094b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions robottelo/host_helpers/satellite_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ec8094b

Please sign in to comment.