From 6095a286a0298c10df3b7bfa163f2f5240b580cd Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 26 Aug 2014 12:22:28 -0300 Subject: workaround for static folder reference during package --- service/pixelated/user_agent.py | 3 +++ 1 file changed, 3 insertions(+) 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']) -- cgit v1.2.3