diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2016-11-14 22:18:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 22:18:44 +0200 |
commit | f2db420a77c9dee11575302ea90f5ecf7fcfb349 (patch) | |
tree | a390ed933923b668ebd2a43dedf6c9f8480adc8b | |
parent | 865c7caae45ed828fd70c7995e305150c753b19a (diff) | |
parent | 72b9c272ccf38782bf6fbcc98810e66ae376a46b (diff) |
Merge pull request #1165 from kesslerm/fix/python-plugin-crash
Fix occasional crashes in python plugins
-rw-r--r-- | python.d/python_modules/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python.d/python_modules/base.py b/python.d/python_modules/base.py index 87364c0270..201128f876 100644 --- a/python.d/python_modules/base.py +++ b/python.d/python_modules/base.py @@ -168,7 +168,7 @@ class SimpleService(threading.Thread): return if status: # handle retries if update failed - time.sleep(self.timetable['next'] - time.time()) + time.sleep(max (0, self.timetable['next'] - time.time())) self.retries_left = self.retries else: self.retries_left -= 1 |