From 65a4eb20889ee8a58216979b90bb442453ef68f8 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Mon, 15 Sep 2014 16:20:20 -0300 Subject: Changed loaded to autoload now it will only autoload if the environment variable AUTOLOAD is set to True --- py-fake-service/app/pixelated_user_agent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'py-fake-service/app/pixelated_user_agent.py') diff --git a/py-fake-service/app/pixelated_user_agent.py b/py-fake-service/app/pixelated_user_agent.py index 73a6dc3a..5931bce5 100644 --- a/py-fake-service/app/pixelated_user_agent.py +++ b/py-fake-service/app/pixelated_user_agent.py @@ -28,7 +28,7 @@ MEDIUM_TAGGED_URL = 'https://static.wazokazi.is/py-mediumtagged.tar.gz' client = None converter = None account = None -loaded = False +autoload = os.environ.get('AUTOLOAD', False) mail_service = MailService() @@ -180,10 +180,10 @@ def load_mailset(mailset): @app.route('/') def index(): - global loaded - if not loaded: + global autoload + if autoload: load_mailset('mediumtagged') - loaded = True + autoload = False return app.send_static_file('index.html') -- cgit v1.2.3