Skip to content

Commit 85875e8

Browse files
committed
revert
1 parent 9a02ad3 commit 85875e8

File tree

2 files changed

+9
-1
lines changed
  • services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar

2 files changed

+9
-1
lines changed

services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_api/_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ async def update_scheduler_data_label(scheduler_data: SchedulerData) -> None:
487487
},
488488
)
489489
except GenericDockerError as e:
490-
if e.error_context()["original_exception"].status == status.HTTP_404_NOT_FOUND:
490+
if e.original_exception.status == status.HTTP_404_NOT_FOUND:
491491
log.info(
492492
"Skipped labels update for service '%s' which could not be found.",
493493
scheduler_data.service_name,

services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/errors.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
from typing import Any
2+
3+
from aiodocker import DockerError
4+
15
from ...core.errors import DirectorError
26

37

@@ -6,6 +10,10 @@ class DynamicSidecarError(DirectorError):
610

711

812
class GenericDockerError(DynamicSidecarError):
13+
def __init__(self, original_exception: DockerError, **ctx: Any) -> None:
14+
super().__init__(original_exception=original_exception, **ctx)
15+
self.original_exception = original_exception
16+
917
msg_template: str = "Unexpected error using docker: {msg}"
1018

1119

0 commit comments

Comments
 (0)