fix cmd parsing

Was crashing when cmd was not an iterable.
This commit is contained in:
Johann Dreo 2023-01-10 11:30:47 +01:00
commit 8da6025673

View file

@ -162,7 +162,10 @@ class TunnelsParser:
return self.tunnels[pid]
def parse(self, cmd):
cmdline = " ".join(cmd)
try:
cmdline = " ".join(cmd)
except TypeError:
cmdline = cmd
logging.debug('autossh cmd line: %s', cmdline)
logging.debug('forwarding regexp: %s', self.re_forwarding)