diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-10-21 16:58:33 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-10-21 17:17:34 -0400 |
commit | 79dec982945e784477d13f7dd5adff7ce96424f7 (patch) | |
tree | 0b6a6a4346e40ed6089d55d8dab1efb464268083 /src/leap | |
parent | b9f8766d72728093f6183c289d23ecd8a1fa562f (diff) |
[bug] fail gracefully for non-posix import
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/bonafide/_protocol.py | 6 | ||||
-rw-r--r-- | src/leap/bitmask/core/service.py | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/leap/bitmask/bonafide/_protocol.py b/src/leap/bitmask/bonafide/_protocol.py index 047ad84..0afcd21 100644 --- a/src/leap/bitmask/bonafide/_protocol.py +++ b/src/leap/bitmask/bonafide/_protocol.py @@ -18,9 +18,13 @@ Bonafide protocol. """ import os -import resource from collections import defaultdict +try: + import resource +except ImportError: + pass + from leap.bitmask.bonafide import config from leap.bitmask.bonafide.provider import Api from leap.bitmask.bonafide.session import Session, OK diff --git a/src/leap/bitmask/core/service.py b/src/leap/bitmask/core/service.py index 5718178..b6447dd 100644 --- a/src/leap/bitmask/core/service.py +++ b/src/leap/bitmask/core/service.py @@ -18,7 +18,10 @@ Bitmask-core Service. """ import json -import resource +try: + import resource +except ImportError: + pass from twisted.internet import reactor from twisted.logger import Logger |