From c9bdec5d14d71cff36ae7fe47667b6a492c8e80b Mon Sep 17 00:00:00 2001 From: Jeppe Pihl Date: Fri, 25 Aug 2023 16:12:32 +0200 Subject: [PATCH] added process_monitor property to NamespaceShell --- NEWS.rst | 3 ++- src/dummynet/namespace_shell.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.rst b/NEWS.rst index c7475e4..644de81 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -5,7 +5,8 @@ every change, see the Git log. Latest ------ -* tbd +* Minor: Added ``process_monitor`` property to ``NamespaceShell`` so that + it's compatible with ``HostShell``. 2.3.0 ----- diff --git a/src/dummynet/namespace_shell.py b/src/dummynet/namespace_shell.py index e893fb3..610005c 100644 --- a/src/dummynet/namespace_shell.py +++ b/src/dummynet/namespace_shell.py @@ -3,6 +3,10 @@ def __init__(self, name, shell): self.name = name self.shell = shell + @property + def process_monitor(self): + return self.shell.process_monitor + def run(self, cmd, cwd=None): """Run a command. :param cmd: The command to run