From d7b69fcece14373118050da3302bd5c3f60309f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Sat, 9 Jul 2016 14:36:39 +0200 Subject: [PATCH] Check if all the submitted components are available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Ĺ abata --- rida.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rida.py b/rida.py index 0c9c4fb8..c4edd535 100755 --- a/rida.py +++ b/rida.py @@ -121,7 +121,8 @@ def submit_build(): pkg["commit"] = rida.scm.SCM(pkg["repository"]).get_latest() except Exception as e: return "Failed to get the latest commit: %s" % pkgname, 422 - # TODO: Check if the scmurl is checkout-able + if not rida.scm.SCM(pkg["repository"] + "?#" + pkg["commit"]).is_available(): + return "Cannot checkout %s" % pkgname, 422 build = rida.database.Build(module_id=module.id, package=pkgname, format="rpms") db.session.add(build) module.modulemd = mmd.dumps()