Skip to content

Commit

Permalink
Refactor: enabled None
Browse files Browse the repository at this point in the history
  • Loading branch information
Nariman committed Sep 20, 2024
1 parent ddadd1e commit 7b50abd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dissect/target/plugins/os/windows/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def _extract_network_device_config(
static_config["search_domain"] = [static_domain]

if len(static_config) > 0:
static_config["enabled"] = static_config == 0
static_config["enabled"] = None
static_config["dhcp"] = False

# Combine ip and subnetmask for extraction
Expand Down
8 changes: 4 additions & 4 deletions tests/plugins/os/windows/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class MockRegVal:
"search_domain": ["local"],
"metric": 5,
"dhcp": False,
"enabled": False,
"enabled": None,
},
),
(
Expand All @@ -108,7 +108,7 @@ class MockRegVal:
"name": None,
"metric": None,
"dhcp": False,
"enabled": False,
"enabled": None,
},
),
(
Expand Down Expand Up @@ -141,7 +141,7 @@ class MockRegVal:
"metric": None,
"name": None,
"dhcp": False,
"enabled": False,
"enabled": None,
},
),
],
Expand Down Expand Up @@ -289,7 +289,7 @@ def test_windows_network_none(
"search_domain": ["corp"],
"metric": 20,
"dhcp": False,
"enabled": False,
"enabled": None,
},
],
),
Expand Down

0 comments on commit 7b50abd

Please sign in to comment.