[libvirt] [PATCH libvirt-python v2 04/22] event-test.py: Add missing globale statement

Philipp Hahn hahn at univention.de
Fri Sep 21 13:34:59 UTC 2018


to fix loop termination on exit.

Signed-off-by: Philipp Hahn <hahn at univention.de>
---
 examples/event-test.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/event-test.py b/examples/event-test.py
index 1f34930..646ce50 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -663,6 +663,7 @@ def myConnectionCloseCallback(conn, reason, opaque):
         "Error", "End-of-file", "Keepalive", "Client",
         )
     print("myConnectionCloseCallback: %s: %s" % (conn.getURI(), reasonStrings[reason]))
+    global run
     run = False
 
 def usage():
-- 
2.11.0




More information about the libvir-list mailing list