diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index 9c84eea431..a24fa22c9a 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -1144,9 +1144,9 @@ class UsernameReplacementView(APIView): ).update( **{column: new_username} ) - except Exception as exc: # pylint: disable-broad-except + except Exception as exc: # pylint: disable=broad-except log.exception( - "Unable to change username from %s to %s. Reason: %s", + u"Unable to change username from %s to %s. Reason: %s", current_username, new_username, exc @@ -1154,7 +1154,7 @@ class UsernameReplacementView(APIView): return False if num_rows_changed == 0: log.warning( - "Unable to change username from %s to %s because %s doesn't exist.", + u"Unable to change username from %s to %s because %s doesn't exist.", current_username, new_username, current_username, @@ -1162,7 +1162,7 @@ class UsernameReplacementView(APIView): return False log.info( - "Successfully changed username from %s to %s.", + u"Successfully changed username from %s to %s.", current_username, new_username, )