diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-05 16:14:55 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-05 16:14:55 +0100 |
commit | 9f64f6d8d229fff98e51532a1a8ee1032416af10 (patch) | |
tree | 6c907ae33452bc879638b20392c23d248aec8e05 /ick2 | |
parent | 641c1070bf650c0ee14af1e1288d6a849b3aa976 (diff) | |
download | ick2-9f64f6d8d229fff98e51532a1a8ee1032416af10.tar.gz |
Add: ick2.WrongPipelineStatus
Diffstat (limited to 'ick2')
-rw-r--r-- | ick2/__init__.py | 2 | ||||
-rw-r--r-- | ick2/state.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ick2/__init__.py b/ick2/__init__.py index 605c6fa..2827c03 100644 --- a/ick2/__init__.py +++ b/ick2/__init__.py @@ -15,7 +15,7 @@ from .version import __version__, __version_info__ from .logging import setup_logging, log -from .state import ControllerState, NotFound +from .state import ControllerState, NotFound, WrongPipelineStatus from .controllerapi import ( ControllerAPI, ProjectAPI, diff --git a/ick2/state.py b/ick2/state.py index 67cd057..548ce87 100644 --- a/ick2/state.py +++ b/ick2/state.py @@ -89,3 +89,9 @@ class NotFound(Exception): def __init__(self): super().__init__('Resource not found') + + +class WrongPipelineStatus(Exception): # pragma: no cover + + def __init__(self, new_state): + super().__init__('Cannot set pipeline state to {}'.format(new_state)) |