From 6b8145580ada9ef7302e273d151ed08897aed220 Mon Sep 17 00:00:00 2001 From: Ultrabug Date: Wed, 8 Jan 2014 18:53:26 +0100 Subject: fix delay on first execution of each module which could be equal to py3status interval time before being executed --- py3status/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'py3status') diff --git a/py3status/__init__.py b/py3status/__init__.py index 266cb44..4df478e 100755 --- a/py3status/__init__.py +++ b/py3status/__init__.py @@ -450,9 +450,6 @@ class Module(Thread): We will execute the 'kill' method of the module when we terminate. """ while self.lock.is_set(): - # don't be hasty mate, let's take it easy for now - sleep(self.config['interval']) - # execute each method of this module for meth, obj in self.methods.items(): my_method = self.methods[meth] @@ -515,6 +512,9 @@ class Module(Thread): 'user method {} failed ({})'.format(meth, err) ) + # don't be hasty mate, let's take it easy for now + sleep(self.config['interval']) + # check and execute the 'kill' method if present if self.has_kill: try: -- cgit v1.3