Skip to content

Commit c381af9

Browse files
Fix all
1 parent 2e4ff75 commit c381af9

File tree

2 files changed

+648
-4
lines changed

2 files changed

+648
-4
lines changed

css-reports/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def hello():
1818

1919

2020
@app.errorhandler(404)
21-
def page_not_found(e: Exception | int):
21+
def page_not_found(exception: Exception | int):
2222
"""Handle 404 errors by redirecting to the main website."""
23-
print(e)
23+
print(exception)
2424
return redirect("https://cssbham.com", code=302)
2525

2626

@@ -93,8 +93,8 @@ async def fetch_customisation_report():
9393

9494
# Return the file as a response
9595
return send_file(csv_file_path, as_attachment=True)
96-
except Exception as e:
97-
return jsonify({"error": str(e)}), 500
96+
except Exception as unknown_error:
97+
return jsonify({"error": str(unknown_error)}), 500
9898
finally:
9999
# Clean up the generated file
100100
if csv_file_path and os.path.exists(csv_file_path):

0 commit comments

Comments
 (0)