diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
commit | c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /collectors/python.d.plugin/python_modules/bases/FrameworkServices | |
parent | Adding upstream version 1.43.2. (diff) | |
download | netdata-upstream/1.44.3.tar.xz netdata-upstream/1.44.3.zip |
Adding upstream version 1.44.3.upstream/1.44.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py | 6 | ||||
-rw-r--r-- | collectors/python.d.plugin/python_modules/bases/FrameworkServices/UrlService.py | 19 |
2 files changed, 3 insertions, 22 deletions
diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py index a7acc23b6..3f122e1d9 100644 --- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py +++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py @@ -8,7 +8,7 @@ import os from bases.charts import Charts, ChartError, create_runtime_chart from bases.collection import safe_print -from bases.loggers import PythonDLimitedLogger +from bases.loggers import PythonDLogger from third_party.monotonic import monotonic from time import sleep, time @@ -62,7 +62,7 @@ def clean_module_name(name): return name -class SimpleService(PythonDLimitedLogger, object): +class SimpleService(PythonDLogger, object): """ Prototype of Service class. Implemented basic functionality to run jobs by `python.d.plugin` @@ -73,7 +73,7 @@ class SimpleService(PythonDLimitedLogger, object): :param configuration: <dict> :param name: <str> """ - PythonDLimitedLogger.__init__(self) + PythonDLogger.__init__(self) self.configuration = configuration self.order = list() self.definitions = dict() diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/UrlService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/UrlService.py index 1faf036a4..76129d376 100644 --- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/UrlService.py +++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/UrlService.py @@ -6,8 +6,6 @@ import urllib3 -from distutils.version import StrictVersion as version - from bases.FrameworkServices.SimpleService import SimpleService try: @@ -15,28 +13,11 @@ try: except AttributeError: pass -# https://github.com/urllib3/urllib3/blob/master/CHANGES.rst#19-2014-07-04 -# New retry logic and urllib3.util.retry.Retry configuration object. (Issue https://github.com/urllib3/urllib3/pull/326) -URLLIB3_MIN_REQUIRED_VERSION = '1.9' URLLIB3_VERSION = urllib3.__version__ URLLIB3 = 'urllib3' - -def version_check(): - if version(URLLIB3_VERSION) >= version(URLLIB3_MIN_REQUIRED_VERSION): - return - - err = '{0} version: {1}, minimum required version: {2}, please upgrade'.format( - URLLIB3, - URLLIB3_VERSION, - URLLIB3_MIN_REQUIRED_VERSION, - ) - raise Exception(err) - - class UrlService(SimpleService): def __init__(self, configuration=None, name=None): - version_check() SimpleService.__init__(self, configuration=configuration, name=name) self.debug("{0} version: {1}".format(URLLIB3, URLLIB3_VERSION)) self.url = self.configuration.get('url') |