gb2_proxy_init (similar to other gbasf2 commands) often fails without error code, printing error messages to stdout. Thus, just running subprocess.run(check=True) doesn't raise a CalledProcessError, which often happens when initalizing the proxy. If it fails, the errors often get noticed lates, e.g. when trying to get the dirac username.
One challenge with implementing this is, that I need to capture the output, but at the same time I need to make sure the output is printed to stdout and allow the user to provide input
Frequent errors:
Bad passphrase
Generating proxy...
Enter Certificate password:
Bad passphrase
Error: Operation not permitted ( 1 : )
[x] Retry on bad passphrase
Can't find Certificates / Keys:
Generating proxy...
Can't find user certificate and key
Error: Operation not permitted ( 1 : )
gb2_proxy_init
(similar to other gbasf2 commands) often fails without error code, printing error messages to stdout. Thus, just runningsubprocess.run(check=True)
doesn't raise aCalledProcessError
, which often happens when initalizing the proxy. If it fails, the errors often get noticed lates, e.g. when trying to get the dirac username.One challenge with implementing this is, that I need to capture the output, but at the same time I need to make sure the output is printed to stdout and allow the user to provide input
Frequent errors:
Bad passphrase
Can't find Certificates / Keys:
CalledProcessError
when keys not found