mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 19:24:23 +00:00
Delete channel mode information
This commit is contained in:
@@ -263,7 +263,6 @@ class Channel:
|
||||
@dataclass
|
||||
class ChannelModel:
|
||||
name: str
|
||||
mode: str
|
||||
uids: list
|
||||
|
||||
UID_CHANNEL_DB: list[ChannelModel] = []
|
||||
@@ -302,21 +301,6 @@ class Channel:
|
||||
|
||||
return result
|
||||
|
||||
def update(self, name: str, newMode: str) -> bool:
|
||||
|
||||
result = False
|
||||
|
||||
for record in self.UID_CHANNEL_DB:
|
||||
if record.name == name:
|
||||
record.mode = newMode
|
||||
result = True
|
||||
self.log.debug(f'Mode ({record.name}) has been updated with new mode {newMode}')
|
||||
|
||||
if not result:
|
||||
self.log.critical(f'The channel mode {newMode} was not updated, name = {name}')
|
||||
|
||||
return result
|
||||
|
||||
def delete(self, name: str) -> bool:
|
||||
|
||||
result = False
|
||||
|
||||
Reference in New Issue
Block a user