From c124b4c49e3dce55ed4687e81065e62476db7f32 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Fri, 18 Jun 2021 00:38:45 -0400 Subject: [PATCH] Replace `str.removeprefix` to avoid having to bump Python version to 3.9 --- matrix_puppeteer_line/db/message.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix_puppeteer_line/db/message.py b/matrix_puppeteer_line/db/message.py index 613e467..d5b4a19 100644 --- a/matrix_puppeteer_line/db/message.py +++ b/matrix_puppeteer_line/db/message.py @@ -100,4 +100,5 @@ class Message: async def delete_all_noid_msgs(cls, room_id: RoomID) -> None: status = await cls.db.execute("DELETE FROM message " "WHERE mid IS NULL AND mx_room=$1", room_id) - return int(status.removeprefix("DELETE ")) + # Skip leading "DELETE " + return int(status[7:])