mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
chore: use contextlib.surpress instead of passing on error (#24896)
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
72150ebadf
commit
e585db85b6
@@ -17,6 +17,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
@@ -167,11 +168,8 @@ class GSheetsEngineSpec(ShillelaghEngineSpec):
|
||||
except (TypeError, json.JSONDecodeError):
|
||||
return encrypted_extra
|
||||
|
||||
try:
|
||||
with contextlib.suppress(KeyError):
|
||||
config["service_account_info"]["private_key"] = PASSWORD_MASK
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
return json.dumps(config)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user