Unverified Commit a13d1cbc authored by Roland Denis's avatar Roland Denis
Browse files

Error message to stderr and raising exception when missing GITLAB token.

So that the details are printed in the webserver log and a specific page is
displayed to the client (without the details).
parent cccdefa5
Pipeline #4261 passed with stages
in 50 seconds
......@@ -473,8 +473,8 @@ def create_job_request(job_offer, debug):
# gitlab_private_token = os.environ['GITLAB_PRIVATE_TOKEN']
gitlab_private_token = os.getenv('GITLAB_PRIVATE_TOKEN', GITLAB_TOKEN)
except KeyError:
print("GITLAB_PRIVATE_TOKEN environment variable not set!")
sys.exit(1)
print("[ERROR] GITLAB_PRIVATE_TOKEN environment variable not set!", file=sys.stderr)
raise
if debug.verbose:
print('[DEBUG] Gitlab connection to {} '.format(GITLAB_URL) +
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment