Browse Source

move BatcaveClient into submodule

Helge Jung 9 years ago
parent
commit
c5bcc4f0cf
3 changed files with 13 additions and 0 deletions
  1. 5 0
      modules/batcave/__init__.py
  2. 0 0
      modules/batcave/client.py
  3. 8 0
      modules/ffpb.py

+ 5 - 0
modules/batcave/__init__.py

@@ -0,0 +1,5 @@
+from .client import BatcaveClient
+
+__ALL__ = [
+    'BatcaveClient'
+]

+ 0 - 0
modules/batcave_client.py → modules/batcave/client.py


+ 8 - 0
modules/ffpb.py

@@ -15,12 +15,20 @@ import os
 import random
 import shelve
 import subprocess
+import sys
 import time
 
 import dns.resolver, dns.reversename
 import SocketServer
 import threading
 
+# ensure our directory is on path (in order to load batcave module)
+__my_dir = os.path.dirname(__file__)
+if __my_dir not in sys.path:
+    sys.path.append(__my_dir)
+
+from batcave import BatcaveClient
+
 msgserver = None
 peers_repo = None