1 parent 23296a2 commit 9f6b9f6Copy full SHA for 9f6b9f6
1 file changed
dir-sdk-python/agntcy/dir_sdk/client/dirctl/verification.py
@@ -125,10 +125,13 @@ def _verify_with_oidc(
125
126
def parse_verify_response(output_path: str) -> sign_v1.VerifyResponse:
127
try:
128
- output = open(output_path, "rb").read()
129
- json_data = json.loads(output.decode("utf-8"))
+ with open(output_path, "rb") as f:
+ output = f.read().decode("utf-8")
130
+
131
+ json_data = json.loads(output)
132
response = sign_v1.VerifyResponse()
133
json_format.ParseDict(json_data, response)
134
135
return response
136
except (json.JSONDecodeError, UnicodeDecodeError) as e:
137
msg = f"Failed to parse verification response: {e}"
0 commit comments