From fe9e2c65bc649acbc68699ebefa1b44b56aff6a2 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 31 Jan 2016 18:59:17 +0530 Subject: [PATCH] Work around pyopenssl exception to shutdown (win32) --- oml/__main__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oml/__main__.py b/oml/__main__.py index ddf6d0e..805f78a 100644 --- a/oml/__main__.py +++ b/oml/__main__.py @@ -25,3 +25,8 @@ if len(sys.argv) > 1 and sys.argv[1] == 'server': server.run() else: commands.main() +if sys.platform == 'win32': + # Work around pyopenssl exception to shutdown + def handle_exception(*args, **kwargs): + pass + sys.excepthook = handle_exception