mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
using dataclasses instead of typed namedtuple
This commit is contained in:
@@ -20,9 +20,10 @@
|
||||
# ========================================================================== #
|
||||
|
||||
|
||||
import dataclasses
|
||||
|
||||
from typing import List
|
||||
from typing import Dict
|
||||
from typing import NamedTuple
|
||||
|
||||
|
||||
# =====
|
||||
@@ -31,7 +32,8 @@ class IpmiPasswdError(Exception):
|
||||
super().__init__("Incorrect IPMI passwd file: " + msg)
|
||||
|
||||
|
||||
class IpmiUserCredentials(NamedTuple):
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class IpmiUserCredentials:
|
||||
ipmi_user: str
|
||||
ipmi_passwd: str
|
||||
kvmd_user: str
|
||||
|
||||
Reference in New Issue
Block a user