Skip to content

Commit

Permalink
Remove the clr.AddReference command, it is causing problems when te…
Browse files Browse the repository at this point in the history
…sting extensions
  • Loading branch information
MKLeb committed May 23, 2023
1 parent 23582dc commit 1a3b34d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/utils/win_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
import salt.utils.winapi
else:
# This uses .NET to get network settings and is faster than WMI
import clr
# We need the clr import for the `System.Net` import
import clr # pylint: disable=unused-import
from System.Net import NetworkInformation

# TODO: Should we deprecate support for pythonnet 2.5.2, these enumerations can
Expand Down Expand Up @@ -312,7 +313,6 @@ def _get_ip_wins_info(i_face):


def _get_network_interfaces():
clr.AddReference("System.Net")
return NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()


Expand Down

0 comments on commit 1a3b34d

Please sign in to comment.