Commit 915b74be authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Log and suppress exceptions when exiting docker.Network

parent 932a1d45
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -559,7 +559,12 @@ class Network:
		return self

	def __exit__(self, etype: type[BaseException], exc: BaseException, tb: TracebackType) -> None:
		try:
			self.destroy()
		except CalledProcessError:
			logging.getLogger(__name__).error(f"network removal failed while stopping")
		except Exception:
			logging.getLogger(__name__).exception("ignoring exception while stopping")

	@property
	def name(self) -> str: