comparison scripts/getan-eval.py @ 390:da9a400848fd

Fix using umlauts in usernames like Björn for getan-eval.py script
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 09 Feb 2015 10:16:55 +0100
parents 20fde79f8e12
children 5ee2ce059338
comparison
equal deleted inserted replaced
389:9a0dba03d16c 390:da9a400848fd
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 print render(database=options.database, user=options.user, 57 if options.user:
58 user = options.user.decode(encoding)
59
60 print render(database=options.database, user=user,
58 template=template_name, year=year, week=week, 61 template=template_name, year=year, week=week,
59 project=options.project, empty_projects=options.empty) 62 project=options.project, empty_projects=options.empty)
60 63
61 64
62 if __name__ == '__main__': 65 if __name__ == '__main__':
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)