testenv: Prepend underscor to internal method
Change-Id: I2297f4b44d6f0c88409ab6982de4e3640a6a48b2
diff --git a/src/osmo_gsm_tester/testenv.py b/src/osmo_gsm_tester/testenv.py
index 77d844a..ea71df9 100644
--- a/src/osmo_gsm_tester/testenv.py
+++ b/src/osmo_gsm_tester/testenv.py
@@ -56,7 +56,7 @@
self.objects_to_clean_up = None
MainLoop.register_poll_func(self.poll)
if self._test.timeout is not None: # aimed at firing once
- MainLoop.register_poll_func(self.timeout_expired, timestep=self._test.timeout)
+ MainLoop.register_poll_func(self._timeout_expired, timestep=self._test.timeout)
def test(self):
return self._test
@@ -122,9 +122,9 @@
except Exception:
log_module.log_exn()
- def timeout_expired(self):
+ def _timeout_expired(self):
# Avoid timeout being called several times:
- MainLoop.unregister_poll_func(self.timeout_expired)
+ MainLoop.unregister_poll_func(self._timeout_expired)
raise log_module.Error('Test Timeout triggered: %d seconds elapsed' % self._test.elapsed_time())
def poll(self):
@@ -146,7 +146,7 @@
self.objects_cleanup()
self.suite_run.reserved_resources.put_all()
MainLoop.unregister_poll_func(self.poll)
- MainLoop.unregister_poll_func(self.timeout_expired)
+ MainLoop.unregister_poll_func(self._timeout_expired)
self.test_import_modules_cleanup()
self.set_overlay_template_dir(None)