Commit d6f303bd authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

snf-ci: Check uniqueness of build_ids

If the user tries to overwrite a build_id that is
already in use, exit with an error message.
parent cb2b3e6c
......@@ -12,7 +12,7 @@ import logging
import fabric.api as fabric
import subprocess
import tempfile
from ConfigParser import ConfigParser
from ConfigParser import ConfigParser, DuplicateSectionError
from kamaki.cli import config as kamaki_config
from kamaki.clients.astakos import AstakosClient
......@@ -485,7 +485,14 @@ class SynnefoCI(object):
% _green(self.build_id))
# Create a new section
except DuplicateSectionError:
msg = ("Build id \"%s\" already in use. " +
"Please use a uniq one or cleanup \"%s\" file.\n") \
% (self.build_id, self.temp_config_file)
creation_time = \
time.strftime("%a, %d %b %Y %X", time.localtime())
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