From d86413ad81135454df7ef1c7d7faeb52eb51efa8 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Wed, 1 Feb 2023 12:24:22 +0100 Subject: adding some common stuff, less code replica --- todb.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'todb.py') diff --git a/todb.py b/todb.py index e5988cd..7426ace 100644 --- a/todb.py +++ b/todb.py @@ -13,8 +13,10 @@ def todb(sql, values): if type(values) == list: cur = conn.cursor() cur.executemany(sql, values) + return cur.rowcount elif type(values) == tuple: conn.execute(sql, values) + return 1 else: print("OH SHIT") exit() -- cgit v1.2.3