Skip to content

Commit

Permalink
Print correct QR code for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
beavailable committed Sep 30, 2024
1 parent 818ff79 commit ae7e8cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion share.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,10 @@ def start_server(address, port, certfile, keyfile, keypass, handler_class, show_
import qrcode
qr = qrcode.QRCode()
qr.add_data(url)
qr.print_tty(sys.stderr)
if is_windows():
qr.print_ascii(sys.stderr, False, True)
else:
qr.print_tty(sys.stderr)
except ModuleNotFoundError:
pass
server.serve_forever()
Expand Down

0 comments on commit ae7e8cd

Please sign in to comment.