From c5b7077a40972b65dbe3f4fa0c9fda3bedd94d91 Mon Sep 17 00:00:00 2001 From: Yotam Nachum Date: Mon, 12 Sep 2022 12:41:05 +0300 Subject: [PATCH] Use new except syntax --- examples/cpushark/Capture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cpushark/Capture.py b/examples/cpushark/Capture.py index 9db9913..4bc0726 100644 --- a/examples/cpushark/Capture.py +++ b/examples/cpushark/Capture.py @@ -63,7 +63,7 @@ class Capture(NSObject): }) script.on('message', self._onScriptMessage) script.load() - except Exception, e: + except Exception as e: if session is not None: try: session.detach() @@ -93,7 +93,7 @@ class Capture(NSObject): pool = NSAutoreleasePool.alloc().init() try: script.post(message) - except Exception, e: + except Exception as e: print "Failed to post to script:", e del pool