Skip to content

Commit

Permalink
Merge pull request #63 from saschwarz/cmd-image
Browse files Browse the repository at this point in the history
Support running pilbox.image in py2 or py3
  • Loading branch information
agschwender authored Oct 17, 2017
2 parents 7e4824a + ca02d79 commit 87f602c
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 87f602c

Please sign in to comment.