raise tornado.web.HTTPError(403, "No permission for using upload %s" % upload)
# Fetch the repository
- repo_name = self.get_argument("repo")
+ repo_name = self.get_argument("repo", None)
with self.db.transaction():
# Import the package
package = await self.backend.packages.create(upload)
# If the distribution that is coded into the package could not be found,
- # we will send that error to the user
+ # we will send that error to the user...
except NoSuchDistroError as e:
- # XXX probably send something better than this
raise tornado.web.HTTPError(404, "Could not find distribution: %s" % e)
# Find the repository
repo = self.current_user.get_repo(package.distro, repo_name)
if not repo:
- raise tornado.web.HTTPError(404, "Could not find repository: %s" % repo_name)
+ raise tornado.web.HTTPError(404, "Could not find repository")
# Create a new build
build = self.backend.builds.create(repo, package, owner=self.user)