summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-07-25 10:41:35 -0400
committerKali Kaneko <kali@leap.se>2017-07-25 12:29:10 -0400
commit26e7d7da4978a0042d65ba278bca21af80962a9f (patch)
treeb2a07f554db704130895b16603e761d80e1af004 /src
parent1b1c10379da1f298fb08de4a7ca01c66175d4858 (diff)
[refactor] use pixelated-www in leap namespace
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/mua/pixelizer.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/leap/bitmask/mua/pixelizer.py b/src/leap/bitmask/mua/pixelizer.py
index 819ffa7..d0bb410 100644
--- a/src/leap/bitmask/mua/pixelizer.py
+++ b/src/leap/bitmask/mua/pixelizer.py
@@ -49,8 +49,9 @@ try:
from pixelated.bitmask_libraries.smtp import LeapSMTPConfig
from pixelated.config.sessions import SessionCache
from pixelated.config import services
+ from pixelated.resources import set_static_folder
from pixelated.resources.root_resource import RootResource
- import pixelated_www
+ import leap.pixelated_www
HAS_PIXELATED = True
class _LeapMailStore(LeapMailStore):
@@ -120,7 +121,6 @@ try:
name = mailboxes[lower_mboxes.index(lower)]
defer.returnValue(name)
-
except ImportError as exc:
HAS_PIXELATED = False
@@ -150,10 +150,11 @@ def start_pixelated_user_agent(userid, soledad, keymanager, account):
if getattr(sys, 'frozen', False):
# we are running in a |PyInstaller| bundle
- static_folder = os.path.join(sys._MEIPASS, 'pixelated_www')
+ static_folder = os.path.join(sys._MEIPASS, 'leap', 'pixelated_www')
else:
- static_folder = os.path.abspath(pixelated_www.__path__[0])
+ static_folder = os.path.abspath(leap.pixelated_www.__path__[0])
+ set_static_folder(static_folder)
resource = RootResource(services_factory, static_folder=static_folder)
config.host = 'localhost'