Merge pull request #3684 from fchapoton/patch-1

Use the already imported io
This commit is contained in:
Hugo 2019-03-02 23:38:00 +02:00 committed by GitHub
commit 30965818af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -679,8 +679,7 @@ class Image(object):
:returns: png version of the image as bytes
"""
from io import BytesIO
b = BytesIO()
b = io.BytesIO()
self.save(b, 'PNG')
return b.getvalue()