diff --git a/allianceauth/hrapplications/views.py b/allianceauth/hrapplications/views.py index fe7c93f5..789428e2 100755 --- a/allianceauth/hrapplications/views.py +++ b/allianceauth/hrapplications/views.py @@ -57,7 +57,7 @@ def hr_application_create_view(request, form_id=None): app_form = get_object_or_404(ApplicationForm, id=form_id) if request.method == "POST": if Application.objects.filter(user=request.user).filter(form=app_form).exists(): - logger.warn(f"User {request.user} attempting to duplicate application to {app_form.corp}") + logger.warning(f"User {request.user} attempting to duplicate application to {app_form.corp}") else: application = Application(user=request.user, form=app_form) application.save() @@ -92,7 +92,7 @@ def hr_application_personal_view(request, app_id): } return render(request, 'hrapplications/view.html', context=context) else: - logger.warn(f"User {request.user} not authorized to view {app}") + logger.warning(f"User {request.user} not authorized to view {app}") return redirect('hrapplications:personal_view') @@ -105,9 +105,9 @@ def hr_application_personal_removal(request, app_id): logger.info(f"User {request.user} deleting {app}") app.delete() else: - logger.warn(f"User {request.user} attempting to delete reviewed app {app}") + logger.warning(f"User {request.user} attempting to delete reviewed app {app}") else: - logger.warn(f"User {request.user} not authorized to delete {app}") + logger.warning(f"User {request.user} not authorized to delete {app}") return redirect('hrapplications:index') @@ -132,7 +132,7 @@ def hr_application_view(request, app_id): logger.info(f"Saved comment by user {request.user} to {app}") return redirect('hrapplications:view', app_id) else: - logger.warn("User %s does not have permission to add ApplicationComments" % request.user) + logger.warning("User %s does not have permission to add ApplicationComments" % request.user) return redirect('hrapplications:view', app_id) else: logger.debug("Returning blank HRApplication comment form.") @@ -171,7 +171,7 @@ def hr_application_approve(request, app_id): app.save() notify(app.user, "Application Accepted", message="Your application to %s has been approved." % app.form.corp, level="success") else: - logger.warn(f"User {request.user} not authorized to approve {app}") + logger.warning(f"User {request.user} not authorized to approve {app}") return redirect('hrapplications:index') @@ -187,7 +187,7 @@ def hr_application_reject(request, app_id): app.save() notify(app.user, "Application Rejected", message="Your application to %s has been rejected." % app.form.corp, level="danger") else: - logger.warn(f"User {request.user} not authorized to reject {app}") + logger.warning(f"User {request.user} not authorized to reject {app}") return redirect('hrapplications:index') @@ -208,7 +208,7 @@ def hr_application_search(request): app_list = app_list.filter( form__corp__corporation_id=request.user.profile.main_character.corporation_id) except AttributeError: - logger.warn( + logger.warning( "User %s missing main character model: unable to filter applications to search" % request.user) applications = app_list.filter( @@ -246,6 +246,6 @@ def hr_application_mark_in_progress(request, app_id): app.save() notify(app.user, "Application In Progress", message=f"Your application to {app.form.corp} is being reviewed by {app.reviewer_str}") else: - logger.warn( + logger.warning( f"User {request.user} unable to mark {app} in progress: already being reviewed by {app.reviewer}") return redirect("hrapplications:view", app_id) diff --git a/allianceauth/notifications/views.py b/allianceauth/notifications/views.py index e23bf03f..40bc88f5 100644 --- a/allianceauth/notifications/views.py +++ b/allianceauth/notifications/views.py @@ -44,7 +44,7 @@ def notification_view(request, notif_id): notif.mark_viewed() return render(request, 'notifications/view.html', context) else: - logger.warn( + logger.warning( "User %s not authorized to view notif_id %s belonging to user %s", request.user, notif_id, notif.user diff --git a/allianceauth/services/modules/discourse/tasks.py b/allianceauth/services/modules/discourse/tasks.py index d3a542c8..d115211a 100644 --- a/allianceauth/services/modules/discourse/tasks.py +++ b/allianceauth/services/modules/discourse/tasks.py @@ -49,7 +49,7 @@ class DiscourseTasks: DiscourseManager.update_groups(user) except Exception as e: logger.exception(e) - logger.warn("Discourse group sync failed for %s, retrying in 10 mins" % user) + logger.warning("Discourse group sync failed for %s, retrying in 10 mins" % user) raise self.retry(countdown=60 * 10) logger.debug("Updated user %s discourse groups." % user) diff --git a/allianceauth/services/modules/phpbb3/manager.py b/allianceauth/services/modules/phpbb3/manager.py index c62417b1..7e6120a6 100755 --- a/allianceauth/services/modules/phpbb3/manager.py +++ b/allianceauth/services/modules/phpbb3/manager.py @@ -176,7 +176,7 @@ class Phpbb3Manager: logger.debug(f"Proceeding to add phpbb user {username_clean} and pwhash starting with {pwhash[0:5]}") # check if the username was simply revoked if Phpbb3Manager.check_user(username_clean): - logger.warn("Unable to add phpbb user with username %s - already exists. Updating user instead." % username) + logger.warning("Unable to add phpbb user with username %s - already exists. Updating user instead." % username) Phpbb3Manager.__update_user_info(username_clean, email, pwhash) else: try: diff --git a/allianceauth/services/modules/teamspeak3/views.py b/allianceauth/services/modules/teamspeak3/views.py index 3d1ff5e2..e54bd84b 100644 --- a/allianceauth/services/modules/teamspeak3/views.py +++ b/allianceauth/services/modules/teamspeak3/views.py @@ -44,7 +44,7 @@ def activate_teamspeak3(request): def verify_teamspeak3(request): logger.debug("verify_teamspeak3 called by user %s" % request.user) if not Teamspeak3Tasks.has_account(request.user): - logger.warn("Unable to validate user %s teamspeak: no teamspeak data" % request.user) + logger.warning("Unable to validate user %s teamspeak: no teamspeak data" % request.user) return redirect("services:services") if request.method == "POST": form = TeamspeakJoinForm(request.POST)