diff options
author | Dennis Eriksen <d@ennis.no> | 2023-02-01 12:24:22 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-02-01 12:24:22 +0100 |
commit | d86413ad81135454df7ef1c7d7faeb52eb51efa8 (patch) | |
tree | faf9e7cc5bc728065f4d87f86db7c8b190ba42ed /todb.py | |
parent | use new db thingy (diff) | |
download | energyscripts-d86413ad81135454df7ef1c7d7faeb52eb51efa8.tar.gz |
adding some common stuff, less code replica
Diffstat (limited to 'todb.py')
-rw-r--r-- | todb.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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() |