diff --git a/common/exceptions.py b/common/exceptions.py index 7f2cc9e..340b59c 100644 --- a/common/exceptions.py +++ b/common/exceptions.py @@ -17,6 +17,3 @@ class TaskListError(Exception): self.message = message def __str__(self): return "Error in tasklist: {0}".format(self.message) - -class VolumeError(Exception): - pass diff --git a/providers/ec2/tasks/ebs.py b/providers/ec2/tasks/ebs.py index 7a859ee..1e25855 100644 --- a/providers/ec2/tasks/ebs.py +++ b/providers/ec2/tasks/ebs.py @@ -1,5 +1,6 @@ from base import Task from common import phases +from common.exceptions import TaskException from connection import Connect class CreateVolume(Task): @@ -35,3 +36,5 @@ class AttachVolume(Task): raise VolumeError('Unable to find a free block device path for mounting the bootstrap volume') info.conn.volume.attach(info.host['instanceId'], info.bootstrap_device['path']) +class VolumeError(TaskException): + pass