Skip to content
Snippets Groups Projects
Commit face5cd329bc authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:shirt: pylint, mypy

parent bbc6dd83361e
No related branches found
No related tags found
1 merge request!191📝 Add option to activate S3 storage for attachments
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
cmd = [sys.executable, "-m", "twine", "check", f"{target}/*"] cmd = [sys.executable, "-m", "twine", "check", f"{target}/*"]
check_call(cmd) check_call(cmd)
except ImportError: except ImportError:
_logger.warn("No twine, no check done") _logger.warning("No twine, no check done")
for entry in os.listdir(target): for entry in os.listdir(target):
if entry.endswith(".whl"): if entry.endswith(".whl"):
......
...@@ -454,8 +454,11 @@ ...@@ -454,8 +454,11 @@
def remove(self): def remove(self):
"""Remove the service container created""" """Remove the service container created"""
try: try:
_logger.info("Removing %s container", self.name) if self._container is not None:
self._container.remove() _logger.info("Removing %s container", self.name)
self._container.remove()
else:
_logger.info("Container %s already removed", self.name)
except docker.errors.NotFound as exception: except docker.errors.NotFound as exception:
_logger.error("Removing container %s, got: %s", self.name, exception) _logger.error("Removing container %s, got: %s", self.name, exception)
raise exception raise exception
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment