Don't read interfaces if none are set

This commit is contained in:
Nicolas Mowen 2023-09-14 15:33:35 -06:00 committed by GitHub
parent b4393028ba
commit 050a9ebf1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,9 @@ def get_cpu_stats() -> dict[str, dict]:
def get_physical_interfaces(interfaces) -> list:
if not interfaces:
return []
with open("/proc/net/dev", "r") as file:
lines = file.readlines()