Skip to content

Commit

Permalink
restore
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 2, 2023
1 parent 2bdbec4 commit 30b98e8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions c2cwsgiutils/acceptance/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,15 @@ def dc_try(self, args: List[str], **kwargs: Any) -> None:

def stop_all(self) -> None:
self.dc_try(["stop"])
# if self.coverage_paths:
# target_dir = "/reports/"
# os.makedirs(target_dir, exist_ok=True)
# for path in self.coverage_paths:
# try:
# subprocess.run( # nosec
# ["docker", "cp", path, target_dir], check=True, timeout=60
# )
# except Exception:
# self.dc(["ps"])
# raise
if self.coverage_paths:
target_dir = "/reports/"
os.makedirs(target_dir, exist_ok=True)
for path in self.coverage_paths:
try:
subprocess.run(["docker", "cp", path, target_dir], check=True, timeout=60) # nosec
except Exception:
self.dc(["ps"])
raise

def stop(self, container: str) -> None:
self.dc_try(["stop", container])
Expand Down

0 comments on commit 30b98e8

Please sign in to comment.