fix: list tolerates a null _id; declare the cryptography dependency
A stored doc with a present-but-null _id crashed the whole list table: doc.get('_id',
'')[:16] slices None (the '' default only applies when _id is absent), so one bad doc
aborted the render - now uses (doc.get('_id') or '')[:16], mirroring revoke's finder, so
it renders a blank placeholder row. cli.py imports cryptography.exceptions.InvalidTag but
pyproject only pulled cryptography transitively via envelope_crypto - declare it directly.
Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
@@ -9,6 +9,7 @@ description = "CLI key-authorization manager for envelope_crypto"
|
|||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"envelope_crypto @ git+ssh://git@git.rethinkstudios.io/rethink-public/envelope_crypto.git",
|
"envelope_crypto @ git+ssh://git@git.rethinkstudios.io/rethink-public/envelope_crypto.git",
|
||||||
|
"cryptography>=42.0",
|
||||||
"tomli>=2.0; python_version<'3.11'",
|
"tomli>=2.0; python_version<'3.11'",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def run(config, storage, args) -> None:
|
|||||||
for doc in docs:
|
for doc in docs:
|
||||||
meta = doc_meta(doc)
|
meta = doc_meta(doc)
|
||||||
print(
|
print(
|
||||||
f"{doc.get('_id', '')[:16]:<18} "
|
f"{(doc.get('_id') or '')[:16]:<18} "
|
||||||
f"{str(meta.get('friendly', '-')):<16} "
|
f"{str(meta.get('friendly', '-')):<16} "
|
||||||
f"{str(meta.get('created_by', '-')):<18} "
|
f"{str(meta.get('created_by', '-')):<18} "
|
||||||
f"{_created(meta):<21} "
|
f"{_created(meta):<21} "
|
||||||
|
|||||||
Reference in New Issue
Block a user