Skip to content

Commit

Permalink
Revert the use of the walrus := operator
Browse files Browse the repository at this point in the history
This package is used by pulsar with still supports Python 3.7
  • Loading branch information
davelopez committed Nov 30, 2023
1 parent 4eb22fe commit bb8c154
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/exceptions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

def api_error_to_dict(**kwds):
UNKNOWN_ERROR_CODE = error_codes.error_codes_by_name["UNKNOWN"]
if exception := kwds.get("exception", None):
exception = kwds.get("exception", None)
if exception:
# If we are passed a MessageException use err_msg.
default_error_code = getattr(exception, "err_code", UNKNOWN_ERROR_CODE)
default_error_message = getattr(exception, "err_msg", default_error_code.default_error_message)
Expand Down

0 comments on commit bb8c154

Please sign in to comment.