aboutsummaryrefslogtreecommitdiffstats
path: root/filters/email-gravatar.py
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2017-03-09 01:18:10 +0100
committerLukas Fleischer <lfleischer@lfos.de>2017-08-10 15:15:55 +0200
commit67e2b69ec96a117b98c9028013ce0258574efe80 (patch)
treeb15b6f1753bdd3b941ace3ce4cd1e0cf81885807 /filters/email-gravatar.py
parent7f7f91141ced1085dd2c6dbc5c65703d73b1b8c7 (diff)
downloadcgit-67e2b69ec96a117b98c9028013ce0258574efe80.tar.gz
cgit-67e2b69ec96a117b98c9028013ce0258574efe80.tar.xz
filter: set environment variable PYTHONIOENCODING to utf-8
This allows different versions of Python to be used rather than forcing version specific encoding in each script. Signed-off-by: Roy Marples <roy@marples.name> Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'filters/email-gravatar.py')
-rwxr-xr-xfilters/email-gravatar.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/filters/email-gravatar.py b/filters/email-gravatar.py
index d70440e..8b98471 100755
--- a/filters/email-gravatar.py
+++ b/filters/email-gravatar.py
@@ -30,9 +30,6 @@ if email[-1] == '>':
page = sys.argv[2]
-sys.stdin = codecs.getreader("utf-8")(sys.stdin.detach())
-sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
-
md5 = hashlib.md5(email.encode()).hexdigest()
text = sys.stdin.read().strip()