Skip to content

Commit c6e57d1

Browse files
committed
Remove annoying FIXME
Signed-off-by: Matthias Büchse <[email protected]>
1 parent 35be033 commit c6e57d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tests/iaas/mandatory-services/mandatory-iaas-services.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import argparse
1111
from collections import Counter
12+
import json
1213
import logging
1314
import os
1415
import re
@@ -127,8 +128,11 @@ def s3_from_ostack(creds, conn, endpoint):
127128
ec2_creds = [cred for cred in conn.identity.credentials()
128129
if cred.type == "ec2" and cred.project_id == project_id]
129130
for cred in ec2_creds:
130-
# FIXME: Assume cloud is not evil
131-
ec2_dict = eval(cred.blob, {"null": None})
131+
try:
132+
ec2_dict = json.loads(cred.blob)
133+
except Exception:
134+
logger.warning(f"unable to parse credential {cred!r}", exc_info=True)
135+
continue
132136
# print(f"DEBUG: Cred: {ec2_dict}")
133137
creds["AK"] = ec2_dict["access"]
134138
creds["SK"] = ec2_dict["secret"]

0 commit comments

Comments
 (0)