summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2014-08-26 12:22:28 -0300
committerVictor Shyba <victor.shyba@gmail.com>2014-08-26 12:22:42 -0300
commit6095a286a0298c10df3b7bfa163f2f5240b580cd (patch)
tree50c10028ed62ae3475684b4fc614cfeac79e1033
parenta1da1f6852bfa823ef8c8b9f02ae01d769d39198 (diff)
workaround for static folder reference during package
-rw-r--r--service/pixelated/user_agent.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py
index 270ca265..2509ea30 100644
--- a/service/pixelated/user_agent.py
+++ b/service/pixelated/user_agent.py
@@ -29,6 +29,9 @@ from pixelated.adapter.pixelated_mail import PixelatedMail
from pixelated.tags import Tags
static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "web-ui", "app"))
+# this is a workaround for packaging
+if not os.path.exists(static_folder):
+ static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "web-ui", "app"))
app = Flask(__name__, static_url_path='', static_folder=static_folder)
app.config.from_pyfile(os.path.join(os.environ['HOME'], '.pixelated'))
mail_service = MailService(app.config['LEAP_USERNAME'], app.config['LEAP_PASSWORD'], app.config['LEAP_SERVER_NAME'])