From cda16f98f0b1a5e8a6fae4abfc61fb91b4f83ee2 Mon Sep 17 00:00:00 2001 From: peusterm Date: Mon, 25 Mar 2019 16:15:26 +0100 Subject: [PATCH] Improved stability. Change-Id: Ic949c35bcb6c4c1e26e7bead243d41b50044812e Signed-off-by: peusterm --- src/emuvim/dcemulator/net.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 64c173b..9e491b3 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -937,9 +937,12 @@ class DCNetwork(Containernet): :return: """ # try it nicely - if self.ryu_process is not None: - self.ryu_process.terminate() - self.ryu_process.kill() + try: + if self.ryu_process is not None: + self.ryu_process.terminate() + self.ryu_process.kill() + except BaseException as ex: + LOG.warning("Error during Ryu stop: {}".format(ex)) # ensure its death ;-) Popen(['pkill', '-f', 'ryu-manager']) -- 2.25.1