Use character instead of byte strings
This commit is contained in:
parent
7ec1a206ea
commit
92b91c1878
3 changed files with 54 additions and 48 deletions
|
@ -180,7 +180,8 @@ class FileDownloader(object):
|
|||
|
||||
def to_stderr(self, message):
|
||||
"""Print message to stderr."""
|
||||
print >>sys.stderr, message.encode(preferredencoding())
|
||||
assert type(message) == type(u'')
|
||||
sys.stderr.write((message + u'\n').encode(preferredencoding()))
|
||||
|
||||
def to_cons_title(self, message):
|
||||
"""Set console/terminal window title to message."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue