mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-06 11:36:04 +08:00
Another linter fix
This commit is contained in:
parent
09b669e9a8
commit
6292b7f713
1 changed files with 1 additions and 2 deletions
|
@ -19,6 +19,7 @@ try:
|
|||
import msgspec.json
|
||||
|
||||
HAVE_MSGSPEC = True
|
||||
json = None # linter E0601 fix
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
|
@ -81,7 +82,5 @@ def entrypoint(*args, **kwargs):
|
|||
if HAVE_MSGSPEC:
|
||||
print(msgspec.json.encode(result))
|
||||
else:
|
||||
# pylint: disable=E0601 (used-before-assignment)
|
||||
print(json.dumps(result, default=serialize_datetime))
|
||||
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Add table
Reference in a new issue