summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2021-10-06 07:47:47 -0700
committerGitHub <noreply@github.com>2021-10-06 07:47:47 -0700
commit69e56dd0e3c8b4dd230e5e2715b07d8d30bdfd57 (patch)
tree34a32ffec94222296396b6fd05fc3431b4d75e42
parent532479573ab3ecd815795df58a48ae7d68777ee0 (diff)
parentb3eb374e1c653868e86bb971e625e10d535c6f75 (diff)
downloadwerkzeug-69e56dd0e3c8b4dd230e5e2715b07d8d30bdfd57.tar.gz
Merge pull request #2257 from hongkuancn/fix-shortly-bug
shortly example opens redis with `decode_responses=True`
-rw-r--r--examples/shortly/shortly.py4
1 files changed, 3 insertions, 1 deletions
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