From 13398b4a54ed4f36af356f175b9e7cc39c44ca79 Mon Sep 17 00:00:00 2001 From: TheManchineel <37479927+TheManchineel@users.noreply.github.com> Date: Thu, 14 Sep 2023 00:38:05 +0200 Subject: [PATCH] Fix file access --- telegram_epson_printer_bot/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram_epson_printer_bot/__main__.py b/telegram_epson_printer_bot/__main__.py index c419e16..1302aee 100644 --- a/telegram_epson_printer_bot/__main__.py +++ b/telegram_epson_printer_bot/__main__.py @@ -35,7 +35,7 @@ async def incoming_pdf_handler(update: Update, context: ContextTypes.DEFAULT_TYP keys_to_try = [] if path.isfile(KEY_FILE): with open(KEY_FILE, "r") as keys_file: - keys_to_try.extend(keys_file.splitlines()) + keys_to_try.extend(keys_file.read().splitlines()) if update.message.caption: keys_to_try.insert(0, update.message.caption)