[libvirt] [glib PATCH 15/16] event-test: Handle exceptions in a py3 compatible way

Fabiano Fidêncio fidencio at redhat.com
Mon May 20 08:32:01 UTC 2019


Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 examples/event-test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/event-test.py b/examples/event-test.py
index f847e57..efa8f6d 100644
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -35,7 +35,7 @@ def usage():
 def main():
     try:
         opts, args = getopt.getopt(sys.argv[1:], "h", ["help"] )
-    except getopt.GetoptError, err:
+    except getopt.GetoptError as err:
         # print help information and exit:
         print(str(err)) # will print something like "option -a not recognized"
         usage()
-- 
2.21.0




More information about the libvir-list mailing list