Skip to content

Commit

Permalink
chore(deadline): add error handling for deadlinecommand json mode in …
Browse files Browse the repository at this point in the history
…configure_identity_registration_settings.py (#604)
  • Loading branch information
horsmand authored Oct 13, 2021
1 parent 5e1abbc commit d2f6fd8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,13 @@ def run_json(self, *args: Iterable[str]):
# Prepend the arguments with the json command-line flag
transformed_args = ['--json'] + transformed_args

return json.loads(self._call_deadline_command(transformed_args))
result = json.loads(self._call_deadline_command(transformed_args))

if 'ok' in result.keys():
if result['ok'] == False:
raise ValueError('DeadlineCommandError: \n%s' % (result))

return result

def dry_run(self, *args: Iterable[str]):
transformed_args = self._transform_args(args)
Expand Down

0 comments on commit d2f6fd8

Please sign in to comment.