mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-18 00:54:50 -04:00
Fix str in db
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
489402165c
commit
cb6a934732
1 changed files with 8 additions and 7 deletions
15
rip/db.py
15
rip/db.py
|
@ -93,13 +93,14 @@ class Database:
|
||||||
if self.is_dummy:
|
if self.is_dummy:
|
||||||
return
|
return
|
||||||
|
|
||||||
if isinstance(items, str) and len(self.structure) == 1:
|
if isinstance(items, str):
|
||||||
items = [items]
|
if len(self.structure) == 1:
|
||||||
else:
|
items = (items,)
|
||||||
raise TypeError(
|
else:
|
||||||
"Only tables with 1 column can have string inputs. Use a list "
|
raise TypeError(
|
||||||
"where len(list) == len(structure)."
|
"Only tables with 1 column can have string inputs. Use a list "
|
||||||
)
|
"where len(list) == len(structure)."
|
||||||
|
)
|
||||||
|
|
||||||
assert len(items) == len(self.structure)
|
assert len(items) == len(self.structure)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue