]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: don't require typing 40095/head
authorJosh Durgin <jdurgin@redhat.com>
Fri, 12 Mar 2021 21:53:04 +0000 (16:53 -0500)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 12 Mar 2021 22:27:44 +0000 (17:27 -0500)
This isn't available for python2 on centos 7. This is only needed
for nautilus because that's the last release using python 2 and centos 7.

Fixes: https://tracker.ceph.com/issues/49762
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/pybind/mgr/volumes/fs/operations/access.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py

index 158e21c2619bdbca588716ea9599a20c753f876d..44430f5919eb64f858e2050f0acc519fcc76e9ad 100644 (file)
@@ -1,6 +1,9 @@
 import errno
 import json
-from typing import List
+try:
+    from typing import List
+except ImportError:
+    pass # For typing only
 
 def prepare_updated_caps_list(existing_caps, mds_cap_str, osd_cap_str, authorize=True):
     caps_list = [] # type: List[str]
index b232b365840ba07fac71abeef93d08dd39373730..b4cca7363598d6897b745848f798c20be98f05fd 100644 (file)
@@ -6,7 +6,10 @@ import errno
 import logging
 import json
 from datetime import datetime
-from typing import List, Dict
+try:
+    from typing import List, Dict
+except ImportError:
+    pass # For typing only
 
 import cephfs