Mercurial > getan
comparison scripts/getan-eval.py @ 431:8922713adbe6
getan-eval.py: Improves how 'user' is found.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Tue, 30 May 2017 09:01:12 +0200 |
parents | e2b05afaf1bc |
children | 8d03d7ada7e1 |
comparison
equal
deleted
inserted
replaced
430:e2b05afaf1bc | 431:8922713adbe6 |
---|---|
52 encoding = locale.getdefaultlocale()[1] | 52 encoding = locale.getdefaultlocale()[1] |
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 if options.user: | 58 if options.user: |
58 user = options.user.decode(encoding) | 59 user = options.user.decode(encoding) |
59 | 60 |
60 print render(database=options.database, user=user, | 61 print render(database=options.database, user=user, |
61 template=template_name, year=year, week=week, | 62 template=template_name, year=year, week=week, |