Skip to content

Commit

Permalink
make ec2 not to bail when boto is not installed
Browse files Browse the repository at this point in the history
* however make it bail if EC2LatentBuildSlave is used anyway
  • Loading branch information
Mikhail Sobolev committed Aug 2, 2014
1 parent 194b11b commit c42cd1b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions master/buildbot/buildslave/ec2.py
Expand Up @@ -25,14 +25,16 @@
import re
import time

import boto
import boto.ec2
import boto.exception
try:
import boto
except ImportError:
boto = None

from twisted.internet import defer
from twisted.internet import threads
from twisted.python import log

from buildbot import config
from buildbot import interfaces
from buildbot.buildslave.base import AbstractLatentBuildSlave

Expand Down Expand Up @@ -62,6 +64,10 @@ def __init__(self, name, password, instance_type, ami=None,
placement=None, price_multiplier=1.2, tags={}, retry=1,
retry_price_adjustment=1, product_description='Linux/UNIX'):

if not boto:
config.error("The python module 'boto' is needed to use a "
"EC2LatentBuildSlave")

AbstractLatentBuildSlave.__init__(
self, name, password, max_builds, notify_on_missing,
missing_timeout, build_wait_timeout, properties, locks)
Expand Down

0 comments on commit c42cd1b

Please sign in to comment.