From 6093148621d4f8e1e9b799627e23aaf19340a472 Mon Sep 17 00:00:00 2001 From: Schimon Jehudah Date: Wed, 20 Jul 2022 18:44:44 +0000 Subject: [PATCH] Update slixfeed.py --- slixfeed.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/slixfeed.py b/slixfeed.py index 84dad65..95c97ee 100644 --- a/slixfeed.py +++ b/slixfeed.py @@ -684,10 +684,11 @@ def last_entries(conn, num): :param num: integer :return: rows (string) """ - if int(num) > 50: - num = str(50) - elif int(num) < 1: - num = str(1) + num = int(num) + if num > 50: + num = 50 + elif num < 1: + num = 1 cur = conn.cursor() sql = "SELECT title, link FROM entries ORDER BY ROWID DESC LIMIT {}".format(num) results = cur.execute(sql)