chiark / gitweb /
nightly: fix QR icon.png generation
authorHans-Christoph Steiner <hans@eds.org>
Wed, 6 Dec 2017 21:42:11 +0000 (22:42 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 7 Dec 2017 21:39:32 +0000 (22:39 +0100)
fdroidserver/nightly.py

index 75c05645e31741cba3831713fab0d327bbea9d89..37d3e8be83f4a2b13699cd24e32aa90e7e405437 100644 (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')
         try:
             import qrcode
-            img = qrcode.make(repo_url)
-            with open(icon_path, 'wb') as fp:
-                fp.write(img)
+            qrcode.make(repo_url).save(icon_path)
         except Exception:
             exampleicon = os.path.join(common.get_examples_dir(), 'fdroid-icon.png')
             shutil.copy(exampleicon, icon_path)