~1chb1n/mojo/eoan

« back to all changes in this revision

Viewing changes to mojo/utils.py

  • Committer: Ryan Beisner
  • Date: 2018-01-26 23:13:11 UTC
  • mfrom: (462.1.12 mojo3)
  • Revision ID: ryan.beisner@canonical.com-20180126231311-4bsirj5x6ajvhbv8
[chris.macnaughton, r=1chb1n] Additional py3 run time fixes for mojo

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
import time
14
14
 
15
15
from hashlib import sha1
 
16
import six
16
17
from .exceptions import Unprivileged
17
18
 
18
19
 
262
263
        eof = True
263
264
        for stream in to_read:
264
265
            line = stream.read(read_bytes)
 
266
            if six.PY3:
 
267
                line = line.decode('utf-8')
265
268
            if line != "":
266
269
                eof = False
267
270
            output += line