mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-10 05:26:40 +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
|
import msgspec.json
|
||||||
|
|
||||||
HAVE_MSGSPEC = True
|
HAVE_MSGSPEC = True
|
||||||
|
json = None # linter E0601 fix
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -81,7 +82,5 @@ def entrypoint(*args, **kwargs):
|
||||||
if HAVE_MSGSPEC:
|
if HAVE_MSGSPEC:
|
||||||
print(msgspec.json.encode(result))
|
print(msgspec.json.encode(result))
|
||||||
else:
|
else:
|
||||||
# pylint: disable=E0601 (used-before-assignment)
|
|
||||||
print(json.dumps(result, default=serialize_datetime))
|
print(json.dumps(result, default=serialize_datetime))
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue