From de3d7be98e7553a628aa4dcb7a56b80b31515515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20Ka=CC=88ser?= Date: Sat, 8 Aug 2015 15:57:13 +0200 Subject: [PATCH] force parameters --- ipynbsrv/core/signals/container_images.py | 2 +- ipynbsrv/core/signals/container_snapshots.py | 2 +- ipynbsrv/core/signals/containers.py | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ipynbsrv/core/signals/container_images.py b/ipynbsrv/core/signals/container_images.py index 28a3d80..bc2367d 100644 --- a/ipynbsrv/core/signals/container_images.py +++ b/ipynbsrv/core/signals/container_images.py @@ -56,7 +56,7 @@ def delete_on_server(sender, image, **kwargs): try: # FIXME: isn't deleted.... backend = server.get_container_backend() - backend.delete_container_image(image.backend_pk, force=True) + backend.delete_container_image(image.backend_pk, True) except ContainerImageNotFoundError: pass # already removed except ContainerBackendError as ex: diff --git a/ipynbsrv/core/signals/container_snapshots.py b/ipynbsrv/core/signals/container_snapshots.py index 4501702..ed2e949 100644 --- a/ipynbsrv/core/signals/container_snapshots.py +++ b/ipynbsrv/core/signals/container_snapshots.py @@ -34,7 +34,7 @@ def delete_on_server(sender, snapshot, **kwargs): if snapshot is not None: backend = snapshot.container.server.get_container_backend() try: - backend.delete_container_snapshot(snapshot.backend_pk, force=True) + backend.delete_container_snapshot(snapshot.backend_pk, True) except ContainerSnapshotNotFoundError as ex: pass # already removed? except ContainerBackendError as ex: diff --git a/ipynbsrv/core/signals/containers.py b/ipynbsrv/core/signals/containers.py index 6c26c10..a752bd9 100644 --- a/ipynbsrv/core/signals/containers.py +++ b/ipynbsrv/core/signals/containers.py @@ -112,10 +112,7 @@ def delete_on_server(sender, container, **kwargs): pass try: - container.server.get_container_backend().delete_container( - container.backend_pk, - force=True - ) + container.server.get_container_backend().delete_container(container.backend_pk, True) except ContainerNotFoundError as ex: pass # already deleted except ContainerBackendError as ex: @@ -149,7 +146,7 @@ def restart_on_server(sender, container, **kwargs): """ if container is not None: try: - container.server.get_container_backend().restart_container(container.backend_pk) + container.server.get_container_backend().restart_container(container.backend_pk, True) except ContainerBackendError as ex: raise ex @@ -161,7 +158,7 @@ def resume_on_server(sender, container, **kwargs): """ if container is not None: try: - container.server.get_container_backend().resume_container(container.backend_pk) + container.server.get_container_backend().resume_container(container.backend_pk, True) except ContainerBackendError as ex: raise ex @@ -185,7 +182,7 @@ def stop_on_server(sender, container, **kwargs): """ if container is not None: try: - container.server.get_container_backend().stop_container(container.backend_pk) + container.server.get_container_backend().stop_container(container.backend_pk, True) except ContainerBackendError as ex: raise ex @@ -197,7 +194,7 @@ def suspend_on_server(sender, container, **kwargs): """ if container is not None: try: - container.server.get_container_backend().suspend_container(container.backend_pk) + container.server.get_container_backend().suspend_container(container.backend_pk, True) except ContainerBackendError as ex: raise ex