From 7f3c8b8486cd215b63f6d7c493ff40d0f0106b9f Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 11 Nov 2020 17:24:18 +0000 Subject: Conflict in guix-deploy --- bh20simplewebuploader/main.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'bh20simplewebuploader') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 1d7154c..e69caa1 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -257,12 +257,16 @@ def send_home(): port=os.environ.get('PORT', 6379), db=os.environ.get('REDIS_DB', 0)) tweets = [] - for tweet_id in redis_client.zrevrange('bh20-tweet-score:', - 0, -1): - tweets.append( - {k.decode("utf-8"): v.decode("utf-8") for k, v in - redis_client.hgetall(tweet_id).items()} - ) + try: + for tweet_id in redis_client.zrevrange('bh20-tweet-score:', + 0, -1): + tweets.append( + {k.decode("utf-8"): v.decode("utf-8") for k, v in + redis_client.hgetall(tweet_id).items()} + ) + except redis.exceptions.ConnectionError as e: + logging.warning(e) + pass return render_template('home.html', menu='HOME', tweets=tweets, load_map=True) -- cgit v1.2.3