Skip to content

Commit 01f6541

Browse files
author
hpal
committed
change to constant
style fix
1 parent e508a9f commit 01f6541

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pyiceberg/catalog/rest.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,11 @@ def _fetch_access_token(self, session: Session, credential: str) -> str:
296296
client_id, client_secret = None, credential
297297

298298
# take scope from properties or use default CATALOG_SCOPE
299-
scope = self.properties.get("scope") or CATALOG_SCOPE
299+
scope = self.properties.get(SCOPE) or CATALOG_SCOPE
300300

301-
data = {GRANT_TYPE: CLIENT_CREDENTIALS, CLIENT_ID: client_id, CLIENT_SECRET: client_secret,
302-
SCOPE: scope}
301+
data = {GRANT_TYPE: CLIENT_CREDENTIALS, CLIENT_ID: client_id, CLIENT_SECRET: client_secret, SCOPE: scope}
303302
response = session.post(
304-
url=self.auth_url, data=data,
305-
headers={**session.headers, "Content-type": "application/x-www-form-urlencoded"}
303+
url=self.auth_url, data=data, headers={**session.headers, "Content-type": "application/x-www-form-urlencoded"}
306304
)
307305
try:
308306
response.raise_for_status()

0 commit comments

Comments
 (0)