comparison 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
comparison
equal deleted inserted replaced
431:8922713adbe6 432:8d03d7ada7e1
47 week = options.week 47 week = options.week
48 48
49 template_name = options.template or "wochenbericht" 49 template_name = options.template or "wochenbericht"
50 50
51 if not options.encoding: 51 if not options.encoding:
52 encoding = locale.getdefaultlocale()[1] 52 encoding = locale.getdefaultlocale()[1] or "utf-8"
53 53
54 Writer = codecs.getwriter(encoding) 54 Writer = codecs.getwriter(encoding)
55 sys.stdout = Writer(sys.stdout) 55 sys.stdout = Writer(sys.stdout)
56 56
57 user = None 57 user = None
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)