diff scripts/getan-eval.py @ 432:8d03d7ada7e1

getan-eval.py: Fixes a possible encoding detection failure.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 30 May 2017 09:02:48 +0200
parents 8922713adbe6
children 24ccca2442b1
line wrap: on
line diff
--- a/scripts/getan-eval.py	Tue May 30 09:01:12 2017 +0200
+++ b/scripts/getan-eval.py	Tue May 30 09:02:48 2017 +0200
@@ -49,7 +49,7 @@
     template_name = options.template or "wochenbericht"
 
     if not options.encoding:
-        encoding = locale.getdefaultlocale()[1]
+        encoding = locale.getdefaultlocale()[1] or "utf-8"
 
     Writer = codecs.getwriter(encoding)
     sys.stdout = Writer(sys.stdout)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)