From 3b752fcfac7a18891e2f948acae0cb4781678647 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 4 Sep 2012 07:11:01 +0900 Subject: put timer constant instead of hardcoded value --- src/leap/baseapp/constants.py | 1 + src/leap/baseapp/eip.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/leap/baseapp/constants.py (limited to 'src') diff --git a/src/leap/baseapp/constants.py b/src/leap/baseapp/constants.py new file mode 100644 index 00000000..763df23b --- /dev/null +++ b/src/leap/baseapp/constants.py @@ -0,0 +1 @@ +TIMER_MILLISECONDS = 250.0 diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py index 6c3249ff..029ce0ba 100644 --- a/src/leap/baseapp/eip.py +++ b/src/leap/baseapp/eip.py @@ -3,6 +3,7 @@ import time from PyQt4 import QtCore from leap.baseapp.dialogs import ErrorDialog +from leap.baseapp import constants from leap.eip import exceptions as eip_exceptions from leap.eip.eipconnection import EIPConnection @@ -182,8 +183,7 @@ class EIPConductorApp(object): # should bring it here? # to its own class? - # XXX get constant from somewhere else - self.timer.start(250.0) + self.timer.start(constants.TIMER_MILLISECONDS) return if self.eip_service_started is True: -- cgit v1.2.3