From 3c1b08daab2eba6f8a546e34f299a535fc29a510 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 4 Jun 2020 13:57:56 +0300 Subject: [PATCH] Ignore empty PLATFORMIO_AUTH_TOKEN --- platformio/clients/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/clients/account.py b/platformio/clients/account.py index 9e0e6581..084110da 100644 --- a/platformio/clients/account.py +++ b/platformio/clients/account.py @@ -228,8 +228,8 @@ class AccountClient(RESTClient): # pylint:disable=too-many-public-methods return response def fetch_authentication_token(self): - if "PLATFORMIO_AUTH_TOKEN" in os.environ: - return os.environ["PLATFORMIO_AUTH_TOKEN"] + if os.environ.get("PLATFORMIO_AUTH_TOKEN"): + return os.environ.get("PLATFORMIO_AUTH_TOKEN") auth = app.get_state_item("account", {}).get("auth", {}) if auth.get("access_token") and auth.get("access_token_expire"): if auth.get("access_token_expire") > time.time():