Use readline instead of read

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-08-23 13:18:59 +02:00
parent 5e4ac1dc02
commit bc5f1d21c7
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def read_qrcode(file) -> str:
Peut être combiné avec zbar pour directement lire le contenu du QRCode.
"""
with file:
content = file.read()
content = file.readline()
content = content.replace('\n', '')
return content