Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace older exception formatting with f-strings
Browse files Browse the repository at this point in the history
mjsir911 committed Jan 5, 2024
1 parent fcee903 commit a07aa81
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions djangosaml2/backends.py
Original file line number Diff line number Diff line change
@@ -284,9 +284,7 @@ def get_or_create_user(
user = UserModel.objects.get(**user_query_args)
except MultipleObjectsReturned:
logger.error(
"Multiple users match, model: %s, lookup: %s",
UserModel._meta,
user_query_args,
f"Multiple users match, model: {UserModel._meta}, lookup: {user_query_args}",
)
except UserModel.DoesNotExist:
# Create new one if desired by settings
2 changes: 1 addition & 1 deletion djangosaml2/views.py
Original file line number Diff line number Diff line change
@@ -808,7 +808,7 @@ def do_logout_service(self, request, data, binding):
)
except StatusError as e:
response = None
logger.warning("Error logging out from remote provider: " + str(e))
logger.warning(f"Error logging out from remote provider: {e}")
state.sync()
return finish_logout(request, response)

0 comments on commit a07aa81

Please sign in to comment.