From 9b0e43514b52f6fa10dcce47d0dca4c3131af665 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 9 Feb 2015 14:53:18 -0500 Subject: [PATCH] Fix typos --- buildman/component/buildcomponent.py | 4 +++- buildman/jobutil/buildjob.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/buildman/component/buildcomponent.py b/buildman/component/buildcomponent.py index 5cac57afe..f7e2ff253 100644 --- a/buildman/component/buildcomponent.py +++ b/buildman/component/buildcomponent.py @@ -217,6 +217,7 @@ class BuildComponent(BaseComponent): elif phase == BUILD_PHASE.BUILDING: self._build_status.append_log(current_status_string) + @trollius.coroutine def _determine_cache_tag(self, command_comments, base_image_name, base_image_tag, base_image_id): with self._build_status as status_dict: status_dict['total_commands'] = len(command_comments) + 1 @@ -224,7 +225,8 @@ class BuildComponent(BaseComponent): logger.debug('Checking cache on realm %s. Base image: %s:%s (%s)', self.builder_realm, base_image_name, base_image_tag, base_image_id) - return self._current_job.determine_cached_tag(base_image_id, command_comments) or '' + tag_found = self._current_job.determine_cached_tag(base_image_id, command_comments) + raise trollius.Return(tag_found or '') def _build_failure(self, error_message, exception=None): """ Handles and logs a failed build. """ diff --git a/buildman/jobutil/buildjob.py b/buildman/jobutil/buildjob.py index e53b9bcb2..fcf5dcfef 100644 --- a/buildman/jobutil/buildjob.py +++ b/buildman/jobutil/buildjob.py @@ -117,7 +117,7 @@ class BuildJob(object): """ Determines the cached tag by looking for one of the tags being built, and seeing if it exists in the repository. This is a fallback for when no comment information is available. """ - tags = self._build_config.get('docker_tags', ['latest']) + tags = self.build_config.get('docker_tags', ['latest']) repository = self.repo_build.repository existing_tags = model.list_repository_tags(repository.namespace_user.username, repository.name) cached_tags = set(tags) & set([tag.name for tag in existing_tags])