From 45b5863e7387618d95641ba21249c5d33d3b4bee Mon Sep 17 00:00:00 2001 From: xazrad Date: Sat, 12 May 2018 17:17:14 +0300 Subject: [PATCH 1/2] Fix initialization ApiError finish_oauth in LoginClient --- linode/login_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linode/login_client.py b/linode/login_client.py index 6fd7c063c..4c5b3a5fb 100644 --- a/linode/login_client.py +++ b/linode/login_client.py @@ -363,7 +363,7 @@ def oauth_redirect(): "client_secret": self.client_secret }) if r.status_code != 200: - raise ApiError("OAuth token exchange failed", r) + raise ApiError("OAuth token exchange failed", status=r.status_code, json=r.json()) token = r.json()["access_token"] scopes = OAuthScopes.parse(r.json()["scopes"]) return token, scopes From 4eda3949369d9a63aa1d161169b5e48254f807a8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 12 May 2018 19:35:18 +0300 Subject: [PATCH 2/2] Add uid property user in UserProfile --- linode/objects/profile/profile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/linode/objects/profile/profile.py b/linode/objects/profile/profile.py index 7a8c99844..76535961f 100644 --- a/linode/objects/profile/profile.py +++ b/linode/objects/profile/profile.py @@ -12,6 +12,7 @@ class Profile(Base): properties = { 'username': Property(identifier=True), + 'uid': Property(), 'email': Property(mutable=True), 'timezone': Property(mutable=True), 'email_notifications': Property(mutable=True),