diff --git a/pybossa/util.py b/pybossa/util.py index 0f0c11227a..eb01bbae23 100644 --- a/pybossa/util.py +++ b/pybossa/util.py @@ -347,7 +347,7 @@ def with_cache_disabled(f): @wraps(f) def wrapper(*args, **kwargs): env_cache_disabled = os.environ.get('PYBOSSA_REDIS_CACHE_DISABLED') - if env_cache_disabled is None or env_cache_disabled is '0': + if env_cache_disabled is None or env_cache_disabled == '0': os.environ['PYBOSSA_REDIS_CACHE_DISABLED'] = '1' return_value = f(*args, **kwargs) if env_cache_disabled is None: diff --git a/warm.py b/warm.py index 8e73d10ce3..f30df2dcda 100755 --- a/warm.py +++ b/warm.py @@ -51,7 +51,7 @@ def warm_app(id, short_name, featured=False): cached_apps.n_completed_tasks(id) cached_apps.n_volunteers(id) if n_task_runs >= 1000 or featured: - print "Getting stats for %s as it has %s task runs" % (short_name, n_task_runs) + print("Getting stats for %s as it has %s task runs" % (short_name, n_task_runs)) stats.get_stats(id) apps_cached.append(id)