diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-29 15:46:13 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-05-08 03:59:38 +0900 |
commit | 11dffaef4b75806b166db1a46b520e6d147d7969 (patch) | |
tree | a9d370b13b8d22435c81607a6e0e9ea0085cd2a3 /buildstream/_frontend | |
parent | 2390c81411aee2019cec891ea0be5247e779bc2e (diff) | |
download | buildstream-11dffaef4b75806b166db1a46b520e6d147d7969.tar.gz |
_stream.py: Add StreamError exception
Use Stream error for Stream errors.
Diffstat (limited to 'buildstream/_frontend')
-rw-r--r-- | buildstream/_frontend/app.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py index 84c33a385..feac0ab9c 100644 --- a/buildstream/_frontend/app.py +++ b/buildstream/_frontend/app.py @@ -37,7 +37,7 @@ from .. import Scope, Consistency # Import various buildstream internals from .._context import Context from .._project import Project -from .._exceptions import BstError, PipelineError, LoadError, LoadErrorReason, AppError +from .._exceptions import BstError, StreamError, LoadError, LoadErrorReason, AppError from .._message import Message, MessageType, unconditional_messages from .._stream import Stream from .._pipeline import Pipeline, PipelineSelection @@ -316,7 +316,7 @@ class App(): elapsed = self.scheduler.elapsed_time() if session_name: - if isinstance(e, PipelineError) and e.terminated: # pylint: disable=no-member + if isinstance(e, StreamError) and e.terminated: # pylint: disable=no-member self._message(MessageType.WARN, session_name + ' Terminated', elapsed=elapsed) else: self._message(MessageType.FAIL, session_name, elapsed=elapsed) @@ -484,10 +484,10 @@ class App(): self.stream.fetch(self.scheduler, [target]) if not no_checkout and target._get_consistency() != Consistency.CACHED: - raise PipelineError("Could not stage uncached source. " + - "Use `--track` to track and " + - "fetch the latest version of the " + - "source.") + raise AppError("Could not stage uncached source. " + + "Use `--track` to track and " + + "fetch the latest version of the " + + "source.") try: os.makedirs(directory, exist_ok=True) |