From 0ffbaa8e5e6ed24fa7125573ef0b2768557094f0 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 28 Mar 2019 20:14:28 -0700 Subject: [PATCH] control: suppress NotImplementedError when disconnecting networks on shutdown --- coremods/control.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coremods/control.py b/coremods/control.py index 2040603..57bc9b8 100644 --- a/coremods/control.py +++ b/coremods/control.py @@ -71,7 +71,10 @@ def shutdown(irc=None): for ircobj in world.networkobjects.copy().values(): # Disconnect all our networks. - remove_network(ircobj) + try: + remove_network(ircobj) + except NotImplementedError: + continue log.info("Waiting for remaining threads to stop; this may take a few seconds. If PyLink freezes " "at this stage, press Ctrl-C to force a shutdown.")