Subject: Bug#1507: 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

---

From: Mike Gabriel <[email-masked]>
Date: Mon, 15 Jan 2024 20:49:02 +0000

Control: close -1

Discussion / issue tracking continued at:
https://gitlab.x2go.org/x2go/client/pyhoca-cli/-/issues/1
-- 

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: [email-masked], http://das-netzwerkteam.de

---

From: [email-masked] (X2Go Bug Tracking System)
Date: Mon, 15 Jan 2024 20:50:02 +0000

This is an automatic notification regarding your Bug report
which was filed against the pyhoca-cli package:

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

It has been closed by Mike Gabriel <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mike Gabriel <[email-masked]> by
replying to this email.

-- 
1507: https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1507
X2Go Bug Tracking System
Contact [email-masked] with problems

Subject: Closing...
From: Mike Gabriel <[email-masked]>
To: [email-masked]
Date: Mon, 15 Jan 2024 20:49:02 +0000

Control: close -1

DAS-NETZWERKTEAM

Subject: pyhoca-cli exits with success (status code 0) if the remote user does not exist
From: "R. Diez" <[email-masked]>
To: [email-masked]
Date: Mon, 23 Nov 2020 20:18:04 +0100

Package: pyhoca-cli
Version: 0.6.1.2

Example:

Thanks in advance,
   rdiez