A leftover debug print() statement exists in the json_report_year view function at tahrir/views/report.py line 148:
print("Start: ", start, " End: ", stop)
This prints start and end dates to stdout on every request to the weekly leaderboard JSON endpoint (/json/report/y//m//d//week), polluting the server logs in production.
Expected behavior
No debug output should appear in the server console. If logging is needed here, it should use Python's logging module instead.
Proposed fix
Remove the print() call on line 148:
if request.path.endswith("/week"):
# Weekly report
start = get_start_week(year, month, day)
stop = start + timedelta(days=6)
print("Start: ", start, " End: ", stop)
elif day is not None:
A leftover debug
print()statement exists in thejson_report_yearview function attahrir/views/report.pyline 148:This prints start and end dates to stdout on every request to the weekly leaderboard JSON endpoint (/json/report/y//m//d//week), polluting the server logs in production.
Expected behavior
No debug output should appear in the server console. If logging is needed here, it should use Python's logging module instead.
Proposed fix
Remove the print() call on line 148: