Werk #12251: unitrends_replication.py: support for Python 2/Python 3

Component Checks & agents
Title unitrends_replication.py: support for Python 2/Python 3
Date Feb 26, 2021
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.1.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0b8 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

In Python version 2 the agent plugin 'unitrends_replication' crashed with the error message:

Traceback (most recent call last):
  File "unitrends_replication.py", line 11, in <module>
    import urllib.request
ImportError: No module named request

The reason for this is that in previous Python versions "urllib.request" did not exist. This werk introduces an alternative handling of "urllib" for affected python versions.

To the list of all Werks