Mercurial > public > sg101
changeset 874:b59c154d0163
For some reason, don't need to encode output anymore.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 25 Dec 2014 17:20:28 -0600 |
parents | 21946dc3662d |
children | d5d8e90d08b5 07e4622f7aef |
files | downloads/management/commands/dlcatreport.py downloads/management/commands/dlwgetcat.py |
diffstat | 2 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/downloads/management/commands/dlcatreport.py Mon Dec 15 18:48:45 2014 -0600 +++ b/downloads/management/commands/dlcatreport.py Thu Dec 25 17:20:28 2014 -0600 @@ -45,14 +45,12 @@ 'downloads': downloads, }) - # encode it ourselves since it can fail if you try to redirect output to - # a file and any of the content is not ASCII... - self.stdout.write(report.encode('utf-8')) + self.stdout.write(report) def print_titles(self, dls): """Print out the download titles""" for dl in dls: - self.stdout.write(dl.title.encode('utf-8')) + self.stdout.write(dl.title)
--- a/downloads/management/commands/dlwgetcat.py Mon Dec 15 18:48:45 2014 -0600 +++ b/downloads/management/commands/dlwgetcat.py Thu Dec 25 17:20:28 2014 -0600 @@ -48,6 +48,4 @@ 'MEDIA_URL': settings.MEDIA_URL, }) - # encode it ourselves since it can fail if you try to redirect output to - # a file and any of the content is not ASCII... - self.stdout.write(output.encode('utf-8')) + self.stdout.write(output)