summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/event_loop.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-03-28 19:17:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-04-04 12:38:09 +0200
commit9a4631c789b1a141a95ae39c92372e9b00b77239 (patch)
tree86258965a04626310ebf08dae637b58cf359ee85 /src/osmo_gsm_tester/event_loop.py
parentbf176e420ee20e526fc408a8a16d4dc7811ce703 (diff)
Drop event_loop global functions and import MainLoop
Take the chance to identify and drop modules importing event_loop but not using it. Change-Id: Ifa1940cd00138ebc72fbcfd45a0e28246f7a5ed9
Diffstat (limited to 'src/osmo_gsm_tester/event_loop.py')
-rw-r--r--src/osmo_gsm_tester/event_loop.py30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/osmo_gsm_tester/event_loop.py b/src/osmo_gsm_tester/event_loop.py
index 068eca9..a9683dd 100644
--- a/src/osmo_gsm_tester/event_loop.py
+++ b/src/osmo_gsm_tester/event_loop.py
@@ -112,35 +112,7 @@ class EventLoop:
self.wait_no_raise(log_obj, lambda: False, [], {}, timeout=seconds, timestep=seconds)
-evloop = EventLoop()
-
-def register_poll_func(func):
- global evloop
- evloop.register_poll_func(func)
-
-def unregister_poll_func(func):
- global evloop
- evloop.unregister_poll_func(func)
-
-def poll():
- global evloop
- evloop.poll()
-
-def wait_no_raise(log_obj, condition, condition_args, condition_kwargs, timeout, timestep):
- global evloop
- evloop.wait_no_raise(log_obj, condition, condition_args, condition_kwargs, timeout, timestep)
-
-def wait(log_obj, condition, *condition_args, timeout=300, timestep=1, **condition_kwargs):
- global evloop
- evloop.wait(log_obj, condition, *condition_args, timeout=timeout, timestep=timestep, **condition_kwargs)
-
-def sleep(log_obj, seconds):
- global evloop
- evloop.sleep(log_obj, seconds)
-
-def defer(handler, *args, **kwargs):
- global evloop
- evloop.defer(handler, *args, **kwargs)
+MainLoop = EventLoop()
# vim: expandtab tabstop=4 shiftwidth=4