Skip to content

Commit

Permalink
MNT Use encodebytes instead of encodestring. (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchen23 authored Jul 13, 2021
1 parent 91c9aa7 commit 499965a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cortex/webgl/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
def make_base64(imgfile):
with open(imgfile, 'rb') as img:
mtype = mimetypes.guess_type(imgfile)[0]
imbytes = base64.encodestring(img.read())
imbytes = base64.encodebytes(img.read())
data = imbytes.decode('utf-8').strip()
return u"data:{mtype};base64,{data}".format(mtype=mtype, data=data)

Expand Down

0 comments on commit 499965a

Please sign in to comment.