From 6b2468414aa8669c376126181bd66649d3ab959b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 10 May 2020 17:07:39 +0200 Subject: [PATCH] fix passed variable basic auth to fix broken env variables --- CHANGELOG.md | 3 ++- corenetworks/client.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de4f062..6c8fc51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,2 @@ -* initial release +* BUGFIX + * fix passed variable basic auth to fix broken env variables diff --git a/corenetworks/client.py b/corenetworks/client.py index 8f9c4f0..7d8b0e3 100644 --- a/corenetworks/client.py +++ b/corenetworks/client.py @@ -97,9 +97,11 @@ class CoreNetworks(): } if self.config["api_token"]: - self._auth = CoreNetworksTokenAuth(api_token) + self._auth = CoreNetworksTokenAuth(self.config["api_token"]) else: - self._auth = CoreNetworksBasicAuth(user, password, self.__endpoint) + self._auth = CoreNetworksBasicAuth( + self.config["user"], self.config["password"], self.__endpoint + ) @staticmethod def _config(user, password, api_token, auto_commit):