summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPhilipp Hahn <hahn@univention.de>2018-09-26 16:43:31 +0200
committerPhilipp Hahn <pmhahn+github@pmhahn.de>2020-08-05 07:43:01 +0000
commit59c2df2fa48f95c74b68af0df1689416278711f2 (patch)
treef440d35e0091cf44a1e2cb26304a2605b5228f9e /examples
parenta19f08683144964cc44d99c98b414f78a8a1f233 (diff)
downloadlibvirt-python-59c2df2fa48f95c74b68af0df1689416278711f2.tar.gz
examples/event-test: Remove unneeded global statement
It only needed when a value is assigned. Signed-off-by: Philipp Hahn <hahn@univention.de>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/event-test.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/examples/event-test.py b/examples/event-test.py
index fddef64..0bebf23 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -33,7 +33,6 @@ do_debug = False
def debug(msg):
- global do_debug
if do_debug:
print(msg)
@@ -378,32 +377,26 @@ eventLoopThread = None
# Twisted event framework.
def virEventAddHandleImpl(fd, events, cb, opaque):
- global eventLoop
return eventLoop.add_handle(fd, events, cb, opaque)
def virEventUpdateHandleImpl(handleID, events):
- global eventLoop
return eventLoop.update_handle(handleID, events)
def virEventRemoveHandleImpl(handleID):
- global eventLoop
return eventLoop.remove_handle(handleID)
def virEventAddTimerImpl(interval, cb, opaque):
- global eventLoop
return eventLoop.add_timer(interval, cb, opaque)
def virEventUpdateTimerImpl(timerID, interval):
- global eventLoop
return eventLoop.update_timer(timerID, interval)
def virEventRemoveTimerImpl(timerID):
- global eventLoop
return eventLoop.remove_timer(timerID)
@@ -420,7 +413,6 @@ def virEventLoopPollRegister():
# Directly run the event loop in the current thread
def virEventLoopPollRun():
- global eventLoop
eventLoop.run_loop()