From: Kefu Chai Date: Sun, 19 Jul 2020 09:40:24 +0000 (+0800) Subject: pybind/mgr/k8sevents: drop python2 support X-Git-Tag: wip-pdonnell-testing-20200918.022351~591^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ed7311c7561cb4c2c12ae2292ccf531b56fb083c;p=ceph-ci.git pybind/mgr/k8sevents: drop python2 support Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/k8sevents/module.py b/src/pybind/mgr/k8sevents/module.py index e6568269c8a..afdd5ae77b9 100644 --- a/src/pybind/mgr/k8sevents/module.py +++ b/src/pybind/mgr/k8sevents/module.py @@ -33,13 +33,7 @@ import logging import tempfile import threading -try: - # python 3 - from urllib.parse import urlparse -except ImportError: - # python 2 fallback - from urlparse import urlparse - +from urllib.parse import urlparse from datetime import tzinfo, datetime, timedelta from urllib3.exceptions import MaxRetryError,ProtocolError