nightly: fix QR icon.png generation

This commit is contained in:
Hans-Christoph Steiner 2017-12-06 22:42:11 +01:00
parent 5d54446efc
commit c823d4c4a8

View file

@ -192,9 +192,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
icon_path = os.path.join(git_mirror_path, 'icon.png') icon_path = os.path.join(git_mirror_path, 'icon.png')
try: try:
import qrcode import qrcode
img = qrcode.make(repo_url) qrcode.make(repo_url).save(icon_path)
with open(icon_path, 'wb') as fp:
fp.write(img)
except Exception: except Exception:
exampleicon = os.path.join(common.get_examples_dir(), 'fdroid-icon.png') exampleicon = os.path.join(common.get_examples_dir(), 'fdroid-icon.png')
shutil.copy(exampleicon, icon_path) shutil.copy(exampleicon, icon_path)