From a3429b70a587ec54e6ce920142b5a33b01a6012a Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Wed, 1 May 2013 01:17:08 +0900 Subject: -v trace while connecting. --- bin/wsdump.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/wsdump.py b/bin/wsdump.py index 85c455d..0c9e1ae 100755 --- a/bin/wsdump.py +++ b/bin/wsdump.py @@ -57,9 +57,9 @@ class InteractiveConsole(code.InteractiveConsole): def main(): args = parse_args() console = InteractiveConsole() - ws = websocket.create_connection(args.url) if args.verbose > 1: websocket.enableTrace(True) + ws = websocket.create_connection(args.url) print("Press Ctrl+C to quit") def recv(): @@ -106,5 +106,5 @@ def main(): if __name__ == "__main__": try: main() - except Exception, e: + except Exception as e: print(e) -- cgit v1.2.1