summaryrefslogtreecommitdiff
path: root/examples/shortly/shortly.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/shortly/shortly.py')
-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