~rbalint/ubuntu-archive-tools/bzr-to-git

« back to all changes in this revision

Viewing changes to sru-report

  • Committer: Steve Langasek
  • Date: 2020-05-16 19:59:33 UTC
  • Revision ID: steve.langasek@canonical.com-20200516195933-ymljxy32gq2m13p9
sru-report: handle utf-8 output on stdout

Show diffs side-by-side

added added

removed removed

Lines of Context:
760
760
 
761
761
 
762
762
def main():
 
763
    # Force encoding to UTF-8 even in non-UTF-8 locales.
 
764
    import io, sys
 
765
    sys.stdout = io.TextIOWrapper(
 
766
        sys.stdout.detach(), encoding="UTF-8", line_buffering=True)
763
767
    logging.basicConfig(level=DEBUGLEVEL,
764
768
                        format="%(asctime)s - %(levelname)s - %(message)s")
765
769
    lpinit()