mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Fix for register() on Python 3.7, refs #425
This commit is contained in:
parent
6f3ae864f1
commit
4433eafff7
1 changed files with 2 additions and 1 deletions
|
|
@ -400,7 +400,8 @@ class Database:
|
|||
name, arity, fn, **dict(kwargs, deterministic=True)
|
||||
)
|
||||
registered = True
|
||||
except sqlite3.NotSupportedError:
|
||||
except (sqlite3.NotSupportedError, TypeError):
|
||||
# TypeError is Python 3.7 "function takes at most 3 arguments"
|
||||
pass
|
||||
if not registered:
|
||||
self.conn.create_function(name, arity, fn, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue