diff options
author | Kali Kaneko <kali@leap.se> | 2017-08-10 12:55:26 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-10 15:24:24 -0400 |
commit | c3ee473837be32cd01f222e0609af36f919a90d3 (patch) | |
tree | 342064902b8d220898ec20044bb82cd44c8ec64e /src/leap/bitmask/cli | |
parent | 63b3413ced33d7b63cf1a9a5d37070ec81f627c8 (diff) |
[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.
Diffstat (limited to 'src/leap/bitmask/cli')
-rw-r--r-- | src/leap/bitmask/cli/keys.py | 7 |
1 files changed, 6 insertions, 1 deletions
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): |