summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2018-02-16 22:08:28 +0100
committerJelle van der Waa <jelle@vdwaa.nl>2019-01-21 21:19:58 +0100
commit7742430a261f36a834b93d2b8242cf847d25caa3 (patch)
treee0c4950957ef2538cc78cde2aedece2829b3c3ca /main
parentcbee9abdc90262aa2860023d5d66412500b5f2d0 (diff)
downloadarchweb-7742430a261f36a834b93d2b8242cf847d25caa3.tar.gz
archweb-7742430a261f36a834b93d2b8242cf847d25caa3.zip
md5 expects bytes, so encode the string
Diffstat (limited to 'main')
-rw-r--r--main/log.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/log.py b/main/log.py
index 5c745cc8..004dbd7b 100644
--- a/main/log.py
+++ b/main/log.py
@@ -45,7 +45,7 @@ class RateLimitFilter(object):
return True
trace = '\n'.join(traceback.format_exception(*record.exc_info))
- key = md5(trace).hexdigest()
+ key = md5(trace.encode('utf-8')).hexdigest()
cache = self.cache_module.cache
# Test if the cache works