Skip to content

Commit

Permalink
Run pilbox.image in py2 or py3
Browse files Browse the repository at this point in the history
  • Loading branch information
saschwarz committed Oct 16, 2017
1 parent 7e4824a commit ca02d79
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pilbox/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,10 @@ def main():
quality=options.quality,
progressive=options.progressive,
preserve_exif=options.preserve_exif)
sys.stdout.write(stream.read())
try:
sys.stdout.buffer.write(stream.read())
except AttributeError:
sys.stdout.write(stream.read())
stream.close()


Expand Down

0 comments on commit ca02d79

Please sign in to comment.