# HG changeset patch # User dfraser # Date 1236775713 0 # Node ID 90ec4de2df6b645a1d09da6a04a86a41e3b9ea75 # Parent a68da2b81220efbf9693a053afe51d82cb0778d7 Check whether fetching `TargetPlatform` succeeds and adjust log appropriately. Fixes #310 diff --git a/bitten/queue.py b/bitten/queue.py --- a/bitten/queue.py +++ b/bitten/queue.py @@ -292,10 +292,15 @@ # Ignore pending builds for deactived build configs config = BuildConfig.fetch(self.env, build.config) if not config.active: + target_platform = TargetPlatform.fetch(self.env, build.platform) + if target_platform: + target_platform_name = '"%s"' % (target_platform.name,) + else: + target_platform_name = 'unknown platform "%s"' % (build.platform,) log.info('Dropping build of configuration "%s" at ' - 'revision [%s] on "%s" because the configuration is ' + 'revision [%s] on %s because the configuration is ' 'deactivated', config.name, build.rev, - TargetPlatform.fetch(self.env, build.platform).name) + target_platform_name) return True # Stay within the revision limits of the build config