Subject: pyhoca-cli exits with success (status code 0) if the remote user does not exist

From: "R. Diez" <[email-masked]>
Date: Mon, 23 Nov 2020 20:18:04 +0100

Package: pyhoca-cli
Version: 0.6.1.2

If the remote user does not exist, then pyhoca-cli exits with success (exit code 0). The calling script does not know then that the connection has failed.

For scripting purposes, it is important that errors are always signalled with a non-zero exit code.

Example:

$ pyhoca-cli  --server localhost  --username=does-not-exist

pyhoca-cli[97275] NOTICE: preparing requested X2Go session
pyhoca-cli[97275] (PyHocaCLI) NOTICE: preparing requested X2Go session
pyhoca-cli[97275] (x2gosessregistry-pylib) NOTICE: registering X2Go session Pyhoca-Client_Session...
pyhoca-cli[97275] (x2goclient-pylib) NOTICE: initializing X2Go session...
pyhoca-cli[97275] (x2gocontrolsession-pylib) NOTICE: connecting to [localhost]:22
pyhoca-cli[97275] (PyHocaCLI) WARN: passwordless login for ,,does-not-exist'' failed [SSHException]
pyhoca-cli: error: No existing session

$ echo "Exit status code: $?"
Exit status code: 0

Thanks in advance,
   rdiez