Revision c7828946
b/ci/utils.py | ||
---|---|---|
249 | 249 |
self.logger.info("Create a new server..") |
250 | 250 |
|
251 | 251 |
# Find a build_id to use |
252 |
if self.build_id is None: |
|
253 |
self._create_new_build_id() |
|
252 |
self._create_new_build_id() |
|
254 | 253 |
|
255 | 254 |
# Find an image to use |
256 | 255 |
image_id = self._find_image(image) |
... | ... | |
475 | 474 |
self.temp_config.read(self.temp_config_file) |
476 | 475 |
|
477 | 476 |
# Find a uniq build_id to use |
478 |
ids = self.temp_config.sections() |
|
479 |
if ids: |
|
480 |
max_id = int(max(self.temp_config.sections(), key=int)) |
|
481 |
self.build_id = max_id + 1 |
|
482 |
else: |
|
483 |
self.build_id = 1 |
|
484 |
self.logger.debug("New build id \"%s\" was created" |
|
477 |
if self.build_id is None: |
|
478 |
ids = self.temp_config.sections() |
|
479 |
if ids: |
|
480 |
max_id = int(max(self.temp_config.sections(), key=int)) |
|
481 |
self.build_id = max_id + 1 |
|
482 |
else: |
|
483 |
self.build_id = 1 |
|
484 |
self.logger.debug("Will use \"%s\" as build id" |
|
485 | 485 |
% _green(self.build_id)) |
486 | 486 |
|
487 | 487 |
# Create a new section |
Also available in: Unified diff