Better warnings

This commit is contained in:
Ayaz Salikhov
2022-01-22 09:17:26 +02:00
parent 77297fc332
commit e12ecdb67a
3 changed files with 13 additions and 20 deletions

View File

@@ -107,6 +107,12 @@ class TrackedContainer:
assert rv == 0 or rv["StatusCode"] == 0
return logs
@staticmethod
def get_warnings(logs: str) -> list[str]:
return [
warning for warning in logs.split("\n") if warning.startswith("WARNING")
]
def remove(self):
"""Kills and removes the tracked docker container."""
if self.container: