Revision 329705c8

b/ci/utils.py
12 12
import fabric.api as fabric
13 13
import subprocess
14 14
import tempfile
15
from ConfigParser import ConfigParser
15
from ConfigParser import ConfigParser, DuplicateSectionError
16 16

  
17 17
from kamaki.cli import config as kamaki_config
18 18
from kamaki.clients.astakos import AstakosClient
......
485 485
                              % _green(self.build_id))
486 486

  
487 487
            # Create a new section
488
            self.temp_config.add_section(str(self.build_id))
488
            try:
489
                self.temp_config.add_section(str(self.build_id))
490
            except DuplicateSectionError:
491
                msg = ("Build id \"%s\" already in use. " +
492
                       "Please use a uniq one or cleanup \"%s\" file.\n") \
493
                    % (self.build_id, self.temp_config_file)
494
                self.logger.error(msg)
495
                sys.exit(1)
489 496
            creation_time = \
490 497
                time.strftime("%a, %d %b %Y %X", time.localtime())
491 498
            self.temp_config.set(str(self.build_id),

Also available in: Unified diff