cg_import fails immediately if build directory already exists

This commit is contained in:
Brendan Reilly 2017-10-09 15:18:59 -04:00 committed by Mike McLean
parent 84d0f8ece8
commit 57dbc9ac01

View file

@ -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)