Entrust: add organization handling-linting

This commit is contained in:
sirferl 2020-11-12 14:14:20 +01:00
parent 949a123cb9
commit 8738c4d893
1 changed files with 6 additions and 8 deletions

View File

@ -83,6 +83,7 @@ def process_options(options, client_id):
} }
return data return data
def get_client_id(my_response, organization): def get_client_id(my_response, organization):
""" """
Helper function for parsing responses from the Entrust API. Helper function for parsing responses from the Entrust API.
@ -94,9 +95,6 @@ def get_client_id(my_response, organization):
except ValueError: except ValueError:
# catch an empty json object here # catch an empty json object here
d = {'response': 'No detailed message'} d = {'response': 'No detailed message'}
s = my_response.status_code
if s > 399:
raise Exception(f"ENTRUST error: {msg.get(s, s)}\n{d['errors']}")
found = False found = False
for y in d["organizations"]: for y in d["organizations"]: