Skip to content

Commit

Permalink
Save QR.png anyway (littlecodersh#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
mymusise authored and chyroc committed May 26, 2018
1 parent 8622c3c commit 1306749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions itchat/components/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ def get_QR(self, uuid=None, enableCmdQR=False, picDir=None, qrCallback=None):
if hasattr(qrCallback, '__call__'):
qrCallback(uuid=uuid, status='0', qrcode=qrStorage.getvalue())
else:
with open(picDir, 'wb') as f:
f.write(qrStorage.getvalue())
if enableCmdQR:
utils.print_cmd_qr(qrCode.text(1), enableCmdQR=enableCmdQR)
else:
with open(picDir, 'wb') as f:
f.write(qrStorage.getvalue())
utils.print_qr(picDir)
return qrStorage

Expand Down

0 comments on commit 1306749

Please sign in to comment.