diff options
author | Ilya <ilyamaschenko@gmail.com> | 2017-07-24 21:13:46 +0900 |
---|---|---|
committer | Ilya <ilyamaschenko@gmail.com> | 2017-07-24 21:13:46 +0900 |
commit | b7e6ad1abe09a8e86217df4aecbe4a5befb23d37 (patch) | |
tree | 40dc33f197a7b546322e504979a801ec0e262a15 /python.d | |
parent | 29cfbfc8d4f8f07ec1b76468d14fae036cfb301e (diff) |
python.d.plugin bugfix: wrap urllib3.disable_warnings in try/except
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/python_modules/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python.d/python_modules/base.py b/python.d/python_modules/base.py index 25fa6ebb10..cbe5aaf9e3 100644 --- a/python.d/python_modules/base.py +++ b/python.d/python_modules/base.py @@ -43,7 +43,10 @@ import msg PATH = os.getenv('PATH', '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin').split(':') -urllib3.disable_warnings() +try: + urllib3.disable_warnings() +except AttributeError: + msg.error('urllib3: warnings were not disabled') # class BaseService(threading.Thread): |