mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-01 00:07:17 +08:00
Fix msgspec schema for Python < 3.11
This commit is contained in:
parent
fc044a062a
commit
40ade9a4ec
1 changed files with 2 additions and 2 deletions
|
|
@ -12,10 +12,10 @@ __description__ = "Restic json output schemas"
|
|||
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
|
||||
try:
|
||||
from msgspec import Struct
|
||||
from enum import StrEnum
|
||||
|
||||
HAVE_MSGSPEC = True
|
||||
except ImportError:
|
||||
|
|
@ -32,7 +32,7 @@ except ImportError:
|
|||
HAVE_MSGSPEC = False
|
||||
|
||||
|
||||
class LsNodeType(StrEnum):
|
||||
class LsNodeType(str, Enum):
|
||||
FILE = "file"
|
||||
DIR = "dir"
|
||||
SYMLINK = "symlink"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue