Commit 14d6bf2e authored by shadMod's avatar shadMod 💬

mv download.py in src/download and rename with views.py

parent 97fdc4aa
# Source code of the Ubuntu-it website
# Copyright (C) 2016 Pietro Albini <pietroalbini@ubuntu.com>
# Copyright (C) 2023 shadMod
# Copyright (C) 2023 shadMod <m.allegro@shadmod.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
......@@ -26,9 +26,8 @@ import flask
import requests
import itsdangerous
from . import cache
from . import launchpad
from .constants import UITWWW_DIR
from ... import cache
from ... import launchpad
DOWNLOAD_FILE = "downloads.toml"
CACHE_FILE = "download-cache.json"
......@@ -245,6 +244,9 @@ class Downloads:
arch = flask.request.form["arch"]
except KeyError:
flask.abort(400)
raise KeyError
except Exception:
raise Exception
# Validate the input
if distro not in self.config["distros"]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment