From: Sebastian Wagner Date: Tue, 1 Oct 2019 09:54:21 +0000 (+0200) Subject: import typing optionally X-Git-Tag: v15.1.0~737^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=30437ba2ebee23c72a1be92efb9fc1a476c00c0e;p=ceph.git import typing optionally Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/deepsea/module.py b/src/pybind/mgr/deepsea/module.py index d042b232d4c5..289dfa662b95 100644 --- a/src/pybind/mgr/deepsea/module.py +++ b/src/pybind/mgr/deepsea/module.py @@ -10,7 +10,10 @@ ceph-mgr DeepSea orchestrator module import json import errno -from typing import Dict +try: + from typing import Dict +except ImportError: + pass # type checking import requests diff --git a/src/pybind/mgr/test_orchestrator/module.py b/src/pybind/mgr/test_orchestrator/module.py index 70118e8a4c54..e742969119b6 100644 --- a/src/pybind/mgr/test_orchestrator/module.py +++ b/src/pybind/mgr/test_orchestrator/module.py @@ -5,7 +5,10 @@ import os import threading import functools from subprocess import check_output, CalledProcessError -from typing import Callable, TypeVar, List +try: + from typing import Callable, List +except ImportError: + pass # type checking import six