diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-22 17:06:32 -0300 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-22 17:06:32 -0300 |
commit | 6d56902df61c739870278a27cd0184a745672845 (patch) | |
tree | 122d983893c27bec01c55e2fa7367df41a9c5e45 /service/pixelated/user_agent.py | |
parent | 13e994b517a77259cd6bbfaf7ba5eefd1a06084a (diff) |
extracting config for leap to config file
Diffstat (limited to 'service/pixelated/user_agent.py')
-rw-r--r-- | service/pixelated/user_agent.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py index f2f62134..43c8d1bc 100644 --- a/service/pixelated/user_agent.py +++ b/service/pixelated/user_agent.py @@ -14,9 +14,8 @@ from pixelated.adapter.pixelated_mail import PixelatedMail from pixelated.tags import Tags app = Flask(__name__, static_url_path='', static_folder='../../web-ui/app') - -mail_service = MailService() -account = None +app.config.from_pyfile('config/pixelated_ua.cfg') +mail_service = MailService(app.config['LEAP_USERNAME'], app.config['LEAP_PASSWORD'], app.config['LEAP_SERVER_NAME']) def respond_json(entity): @@ -134,9 +133,6 @@ def index(): def setup(): debug_enabled = os.environ.get('DEBUG', False) reactor_manager.start_reactor(logging=debug_enabled) - app.config.from_pyfile('config/pixelated_ua.cfg') - account = app.config['ACCOUNT'] - app.config['DEBUG'] = debug_enabled app.run(host=app.config['HOST'], debug=debug_enabled, port=app.config['PORT']) |