From c3ee473837be32cd01f222e0609af36f919a90d3 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 10 Aug 2017 12:55:26 -0400 Subject: [refactor] fail gracefully if some modules not present this allows for better modularization in, for instance, the debian package. we should be able to install just the submodules for the vpn service, or the mail service. a better modularization needs the mail_services under core to be moved to bitmask.mail, and do the switch in the main service module for bitmask daemon. --- src/leap/bitmask/cli/keys.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/cli') diff --git a/src/leap/bitmask/cli/keys.py b/src/leap/bitmask/cli/keys.py index 12191a5d..82de3868 100644 --- a/src/leap/bitmask/cli/keys.py +++ b/src/leap/bitmask/cli/keys.py @@ -23,7 +23,12 @@ import sys from colorama import Fore from leap.bitmask.cli import command -from leap.bitmask.keymanager.validation import ValidationLevels + +try: + from leap.bitmask.keymanager.validation import ValidationLevels + HAS_KM = True +except ImportError: + HAS_KM = False class Keys(command.Command): -- cgit v1.2.3