]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/k8sevents: drop python2 support
authorKefu Chai <kchai@redhat.com>
Sun, 19 Jul 2020 09:40:24 +0000 (17:40 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 22 Jul 2020 03:55:49 +0000 (11:55 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/k8sevents/module.py

index e6568269c8a6512853a7e0497e72ef18aed10d47..afdd5ae77b9a1ce17331703e81646bcc67771eb9 100644 (file)
@@ -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