mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-12 12:05:07 +00:00
fix(HTTP): simplify key retrieval condition in get_key method
This commit is contained in:
@@ -189,7 +189,7 @@ class HTTP(Vault):
|
||||
|
||||
data = response.json()
|
||||
|
||||
if data.get("status_code") != 200 or not data.get("keys"):
|
||||
if not data.get("keys"):
|
||||
return None
|
||||
|
||||
return data["keys"][0]["key"]
|
||||
|
||||
Reference in New Issue
Block a user