Skip to content

Commit

Permalink
Get rid of constructor call in provider_help
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Bundesmann committed May 21, 2024
1 parent fc2a585 commit ac8e247
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions broker/providers/foreman.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,11 @@ def provider_help(
):
"""Return useful information about Foreman provider."""
if hostgroups:
self.__init__()
all_hostgroups = self.runtime.hostgroups()
logger.info(f"On Foreman {self.instance} you have the following hostgroups:")
for hostgroup in all_hostgroups["results"]:
logger.info(f"- {hostgroup['title']}")
elif hostgroup:
self.__init__()
logger.info(
f"On Foreman {self.instance} the hostgroup {hostgroup} has the following properties:"
)
Expand Down

0 comments on commit ac8e247

Please sign in to comment.