aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-xblogthon.cgi7
1 files changed, 5 insertions, 2 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index c49df11..963f120 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -20,8 +20,11 @@ import locale
import re
import codecs
-# print() will output ascii, but we want utf-8
-sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer)
+# print() will output ascii, but we want utf-8 (python3)
+try:
+ sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer)
+except:
+ None
# Backward compatibilty to python2
try: