nils-braun / b2luigi

Task scheduling and batch running for basf2 jobs made simple
GNU General Public License v3.0
17 stars 11 forks source link

Raise error if `gb2_proxy_init` prints error message #140

Closed meliache closed 3 years ago

meliache commented 3 years ago

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: