From 423c06d2729288737f992571e89dcb7013ed769e Mon Sep 17 00:00:00 2001 From: Manas Date: Jun 21 2019 16:24:47 +0000 Subject: fix configparser typo in taiga auth --- diff --git a/config.ini b/config.ini index 8ae6752..125a458 100644 --- a/config.ini +++ b/config.ini @@ -49,7 +49,9 @@ US_CA_MODIFIES_DELIVERABLES = 21935 [PAGURE] SERVICE_ID = pagure -API_URL = https://pagure.io/api/0/fedora-change-wrangler +API_URL = https://pagure.io/api/0/ +FESCO_REPO = fedora-change-wrangler +RELEASE_NOTES_REPO = Test-for-Release-Notes [BUGZILLA] SERVICE_ID = bugzilla diff --git a/tga/taiga_auth.py b/tga/taiga_auth.py index fc7b6c4..ddcc37e 100644 --- a/tga/taiga_auth.py +++ b/tga/taiga_auth.py @@ -37,11 +37,12 @@ def refresh_token(filename): Doing the follwoing in prod is security risk. """ config = configparser.ConfigParser() - config.read(config(filename)) + config.read(filename) headers = { 'Content-Type': 'application/json', } service_id = config['TAIGA']['SERVICE_ID'] + service_token = config['TAIGA']['SERVICE_TOKEN'] project_id = config['TAIGA']['PROJECT_ID'] taiga_url = config['TAIGA']['TAIGA_URL'] username = keyring.get_password(service_id, "taiga_username") @@ -69,6 +70,7 @@ def refresh_token(filename): print("succesful authentication") except (keyring.errors.PasswordSetError, Exception) as e: print("Failed to set auth token") + print(e) elif r.status_code == 400: print("auth error") except requests.exceptions.RequestException as e: @@ -77,7 +79,7 @@ def refresh_token(filename): def reset(filename): config = configparser.ConfigParser() - config.read(config(filename)) + config.read(filename) headers = { 'Content-Type': 'application/json', }