summaryrefslogtreecommitdiff
path: root/service/app
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2014-08-07 15:06:09 -0300
committerVictor Shyba <victor.shyba@gmail.com>2014-08-07 15:06:09 -0300
commite92847eae88a13cf9c6f407112c2a42b7c46e808 (patch)
tree5467345a865f0da4052301e5b7a657db72b3cbe7 /service/app
parent1e2fba9a96ab2360b82b01bd55217fbb0df3f38d (diff)
Victor/Bruno: Removing APP_ROOT workaround from app and tests
Diffstat (limited to 'service/app')
-rw-r--r--service/app/__init__.py3
-rw-r--r--service/app/pixelated_user_agent.py5
2 files changed, 4 insertions, 4 deletions
diff --git a/service/app/__init__.py b/service/app/__init__.py
index acb5b492..8b137891 100644
--- a/service/app/__init__.py
+++ b/service/app/__init__.py
@@ -1,4 +1 @@
-import sys
-import os
-sys.path.insert(0, os.environ['APP_ROOT'])
diff --git a/service/app/pixelated_user_agent.py b/service/app/pixelated_user_agent.py
index d13a7fdc..fb71a6f5 100644
--- a/service/app/pixelated_user_agent.py
+++ b/service/app/pixelated_user_agent.py
@@ -112,10 +112,13 @@ def draft_reply_for(mail_id):
def index():
return app.send_static_file('index.html')
-if __name__ == '__main__':
+def setup():
app.config.from_envvar('PIXELATED_UA_CFG')
account = app.config['ACCOUNT']
mail_service = MailService()
converter = MailConverter(mail_service)
app.run(host=app.config['HOST'], debug=app.config['DEBUG'], port=app.config['PORT'])
+
+if __name__ == '__main__':
+ setup()