#183 always encode hello to utf-8
Merged by mikem. Opened by tkopecek.
tkopecek/koji unicode-fix  into  master

Download 183.patch

When stdout is redirected somewhere else than to console, ascii codec is required.

Example of error:

# PYTHONPATH=. cli/koji -d -p koji hello
2016-10-11 11:59:18,731 [DEBUG] koji: Opening new requests session
successfully connected to hub
Traceback (most recent call last):
  File "cli/koji", line 7111, in <module>
    rv = locals()[command].__call__(options, session, args)
  File "cli/koji", line 6891, in handle_moshimoshi
    print "%s, %s!" % (random.choice(greetings), u["name"],)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

:thumbsup:

Pull-Request has been merged by mikem

Metadata