From b7f255ce0b21dc42189205b1f0e46b4f1d9854f9 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Fri, 19 Apr 2013 17:14:20 -0500 Subject: [PATCH] Clarify messages when optional modules are not found. --- websockify/websocket.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/websockify/websocket.py b/websockify/websocket.py index 7adfca8..8240fc3 100644 --- a/websockify/websocket.py +++ b/websockify/websocket.py @@ -50,15 +50,15 @@ except: return struct.unpack(fmt, slice) # Degraded functionality if these imports are missing -for mod, sup in [('numpy', 'HyBi protocol'), ('ssl', 'TLS/SSL/wss'), - ('multiprocessing', 'Multi-Processing'), - ('resource', 'daemonizing')]: +for mod, msg in [('numpy', 'HyBi protocol will be slower'), + ('ssl', 'TLS/SSL/wss is disabled'), + ('multiprocessing', 'Multi-Processing is disabled'), + ('resource', 'daemonizing is disabled')]: try: globals()[mod] = __import__(mod) except ImportError: globals()[mod] = None - print("WARNING: no '%s' module, %s is slower or disabled" % ( - mod, sup)) + print("WARNING: no '%s' module, %s" % (mod, msg)) if multiprocessing and sys.platform == 'win32': # make sockets pickle-able/inheritable import multiprocessing.reduction