From b3eb374e1c653868e86bb971e625e10d535c6f75 Mon Sep 17 00:00:00 2001 From: Hongkuan Wang Date: Wed, 6 Oct 2021 22:23:55 +0800 Subject: shortly example opens redis with decode_responses=True --- examples/shortly/shortly.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/shortly/shortly.py b/examples/shortly/shortly.py index 063bf265..10e957e8 100644 --- a/examples/shortly/shortly.py +++ b/examples/shortly/shortly.py @@ -37,7 +37,9 @@ def get_hostname(url): class Shortly: def __init__(self, config): - self.redis = redis.Redis(config["redis_host"], config["redis_port"]) + self.redis = redis.Redis( + config["redis_host"], config["redis_port"], decode_responses=True + ) template_path = os.path.join(os.path.dirname(__file__), "templates") self.jinja_env = Environment( loader=FileSystemLoader(template_path), autoescape=True -- cgit v1.2.1