Skip to content

Commit

Permalink
Remove __virtual__ and __hostname__
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy committed Apr 24, 2024
1 parent a497f5a commit a0a6fba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
17 changes: 0 additions & 17 deletions salt/utils/win_lgpo_netsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
store='lgpo')
"""

import socket

import salt.utils.platform
import salt.utils.win_pwsh
from salt.exceptions import CommandExecutionError
Expand Down Expand Up @@ -106,21 +104,6 @@
"blockoutbound": "Block",
}

__virtualname__ = "netsh"
__hostname__ = socket.gethostname()


# Although utils are often directly imported, it is also possible to use the
# loader.
def __virtual__():
"""
Only load if on a Windows system
"""
if not salt.utils.platform.is_windows():
return False, "This utility only available on Windows"

return __virtualname__


def _get_inbound_text(rule, action):
"""
Expand Down
12 changes: 0 additions & 12 deletions salt/utils/win_pwsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
import salt.utils.platform
from salt.exceptions import CommandExecutionError

__virtualname__ = "win_pwsh"


def __virtual__():
"""
Only load if windows
"""
if not salt.utils.platform.is_windows():
return False, "This utility will only run on Windows"

return __virtualname__


def run_dict(cmd, cwd=None):
"""
Expand Down

0 comments on commit a0a6fba

Please sign in to comment.