mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 17:59:43 +02:00
feat: initialize network interface state and log interface details
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from core.utils.general.logs import consoleLog
|
||||
from core.utils.data.state import state
|
||||
import psutil
|
||||
|
||||
addrs = psutil.net_if_addrs()
|
||||
@@ -38,3 +39,6 @@ def list_interfaces() -> None:
|
||||
status = "INACTIVE"
|
||||
consoleLog(f"Found Interface: {interface} [{status}]")
|
||||
|
||||
def init_interfaces():
|
||||
state.interfaces = list(addrs.keys())
|
||||
state.active_interfaces = get_active_interfaces()
|
||||
@@ -27,6 +27,8 @@ class AppState(QObject):
|
||||
self.dl_session: Any = None
|
||||
self.active_downloads: List[str] = {}
|
||||
self.window_transparency: bool = False
|
||||
self.interfaces: List = []
|
||||
self.active_interfaces: List = []
|
||||
|
||||
@property
|
||||
def image_path(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user