fix default icon

This commit is contained in:
j 2014-10-31 19:49:36 +01:00
parent 9901f9e6c3
commit 89d9ab4f11

View file

@ -5,7 +5,7 @@
import os import os
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import zipfile import zipfile
from io import StringIO from io import BytesIO
import re import re
from PIL import Image from PIL import Image
@ -48,7 +48,7 @@ def cover(path):
break break
if not data: if not data:
img = Image.new('RGB', (80, 128)) img = Image.new('RGB', (80, 128))
o = StringIO() o = BytesIO()
img.save(o, format='jpeg') img.save(o, format='jpeg')
data = o.getvalue() data = o.getvalue()
o.close() o.close()