[fix] bandit assert warnings (#3243)
Co-authored-by: dni ⚡ <office@dnilabs.com>
This commit is contained in:
@@ -22,7 +22,8 @@ def load_macaroon(
|
||||
aes = AESCipher(key.encode())
|
||||
return aes.decrypt(encrypted_macaroon)
|
||||
|
||||
assert macaroon, "macaroon must be set here"
|
||||
if not macaroon:
|
||||
raise ValueError("macaroon must be set here")
|
||||
|
||||
# if the macaroon is a file path, load it and return hex version
|
||||
if macaroon.split(".")[-1] == "macaroon":
|
||||
|
||||
Reference in New Issue
Block a user