From abb01fa09996cb4c73ea765e6bd790dcd8c4aef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Koma=C4=8Dka=20Juraj?= Date: Sat, 30 Sep 2023 22:00:54 +0200 Subject: [PATCH] Fix limit validation in Tables.export_raw --- kbcstorage/tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kbcstorage/tables.py b/kbcstorage/tables.py index 324c459..12d4773 100644 --- a/kbcstorage/tables.py +++ b/kbcstorage/tables.py @@ -506,7 +506,7 @@ def export_raw(self, table_id, limit=None, file_format='rfc', } if not isinstance(table_id, str) or table_id == '': raise ValueError("Invalid table_id '{}'.".format(table_id)) - if limit is not None and limit is not isinstance(table_id, int): + if limit is not None and not isinstance(limit, int): raise ValueError("Invalid limit '{}'.".format(limit)) if file_format not in ('rfc', 'escaped', 'raw'): raise ValueError("Invalid format '{}'.".format(file_format))