Loading buildstream/_stream.py +11 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import tarfile from contextlib import contextmanager from tempfile import TemporaryDirectory from ._exceptions import StreamError, ImplError, BstError, set_last_task_error from ._exceptions import StreamError, ImplError, BstError, set_last_task_error, LoadError, LoadErrorReason from ._message import Message, MessageType from ._scheduler import Scheduler, SchedStatus, TrackQueue, FetchQueue, BuildQueue, PullQueue, PushQueue from ._pipeline import Pipeline, PipelineSelection Loading Loading @@ -607,6 +607,16 @@ class Stream(): except OSError as e: raise StreamError("Could not remove '{}': {}" .format(workspace.get_absolute_path(), e)) from e else: workspace_project_cache = self._context.get_workspace_project_cache() try: workspace_project_cache.remove(workspace.get_absolute_path()) except LoadError as e: # We might be closing a workspace with a deleted directory if e.reason == LoadErrorReason.MISSING_FILE: pass else: raise # Delete the workspace and save the configuration workspaces.delete_workspace(element_name) Loading Loading
buildstream/_stream.py +11 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import tarfile from contextlib import contextmanager from tempfile import TemporaryDirectory from ._exceptions import StreamError, ImplError, BstError, set_last_task_error from ._exceptions import StreamError, ImplError, BstError, set_last_task_error, LoadError, LoadErrorReason from ._message import Message, MessageType from ._scheduler import Scheduler, SchedStatus, TrackQueue, FetchQueue, BuildQueue, PullQueue, PushQueue from ._pipeline import Pipeline, PipelineSelection Loading Loading @@ -607,6 +607,16 @@ class Stream(): except OSError as e: raise StreamError("Could not remove '{}': {}" .format(workspace.get_absolute_path(), e)) from e else: workspace_project_cache = self._context.get_workspace_project_cache() try: workspace_project_cache.remove(workspace.get_absolute_path()) except LoadError as e: # We might be closing a workspace with a deleted directory if e.reason == LoadErrorReason.MISSING_FILE: pass else: raise # Delete the workspace and save the configuration workspaces.delete_workspace(element_name) Loading