diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2014-01-08 18:53:26 +0100 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2014-01-08 18:53:26 +0100 |
| commit | 6b8145580ada9ef7302e273d151ed08897aed220 (patch) | |
| tree | 00adb88683469c728c374aaff840f025f9d21f72 /py3status/__init__.py | |
| parent | b9635455c9c4e7ea6aeabcb3e3d7cfcb85ec2f6d (diff) | |
fix delay on first execution of each module which could be equal to py3status interval time before being executed
Diffstat (limited to 'py3status/__init__.py')
| -rwxr-xr-x | py3status/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
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: |
