From 57dbc9ac01cc523e223db20e4b3fd35a61ae4e8b Mon Sep 17 00:00:00 2001 From: Brendan Reilly Date: Oct 17 2017 20:41:18 +0000 Subject: cg_import fails immediately if build directory already exists --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 10eed1b..7ac5a0b 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -5195,6 +5195,8 @@ def cg_import(metadata, directory): - a filename containing the metadata """ + if os.path.lexists(directory): + raise koji.GenericError("Destination directory exists: %s" % directory) importer = CG_Importer() return importer.do_import(metadata, directory)