mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 19:04:29 +02:00
Fix account shpw command when PLATFORMIO_AUTH_TOKEN is used
This commit is contained in:
@@ -167,15 +167,13 @@ class AccountClient(RESTClient): # pylint:disable=too-many-public-methods
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
def get_account_info(self, offline=False):
|
def get_account_info(self, offline=False):
|
||||||
account = app.get_state_item("account")
|
account = app.get_state_item("account") or {}
|
||||||
if not account:
|
|
||||||
raise AccountNotAuthorized()
|
|
||||||
if (
|
if (
|
||||||
account.get("summary")
|
account.get("summary")
|
||||||
and account["summary"].get("expire_at", 0) > time.time()
|
and account["summary"].get("expire_at", 0) > time.time()
|
||||||
):
|
):
|
||||||
return account["summary"]
|
return account["summary"]
|
||||||
if offline:
|
if offline and account.get("email"):
|
||||||
return {
|
return {
|
||||||
"profile": {
|
"profile": {
|
||||||
"email": account.get("email"),
|
"email": account.get("email"),
|
||||||
|
Reference in New Issue
Block a user