summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/bonafide/_protocol.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-10-21 16:58:33 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-10-21 17:17:34 -0400
commit79dec982945e784477d13f7dd5adff7ce96424f7 (patch)
tree0b6a6a4346e40ed6089d55d8dab1efb464268083 /src/leap/bitmask/bonafide/_protocol.py
parentb9f8766d72728093f6183c289d23ecd8a1fa562f (diff)
[bug] fail gracefully for non-posix import
Diffstat (limited to 'src/leap/bitmask/bonafide/_protocol.py')
-rw-r--r--src/leap/bitmask/bonafide/_protocol.py6
1 files changed, 5 insertions, 1 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