From 30437ba2ebee23c72a1be92efb9fc1a476c00c0e Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 1 Oct 2019 11:54:21 +0200 Subject: [PATCH] import typing optionally Signed-off-by: Sebastian Wagner --- src/pybind/mgr/deepsea/module.py | 5 ++++- src/pybind/mgr/test_orchestrator/module.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/deepsea/module.py b/src/pybind/mgr/deepsea/module.py index d042b232d4c..289dfa662b9 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 70118e8a4c5..e742969119b 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 -- 2.39.5