Skip to content

Commit

Permalink
fixes error with shadowed name 'version' in NetBoxHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
bb-Ricardo committed Sep 14, 2021
1 parent 804d2d1 commit 6268a84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions module/netbox/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class NetBoxHandler:
# set bogus default version
version = "0.0.1"

def __init__(self, settings=None, inventory=None, version=None):
def __init__(self, settings=None, inventory=None, nb_version=None):

self.settings = settings
self.inventory = inventory
self.version = version
self.version = nb_version

self.parse_config_settings(settings)

Expand Down
2 changes: 1 addition & 1 deletion netbox-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def main():
netbox_settings = get_config(config_handler, section="netbox", valid_settings=NetBoxHandler.settings)

# establish NetBox connection
nb_handler = NetBoxHandler(settings=netbox_settings, inventory=inventory, version=__version__)
nb_handler = NetBoxHandler(settings=netbox_settings, inventory=inventory, nb_version=__version__)

# if purge was selected we go ahead and remove all items which were managed by this tools
if args.purge is True:
Expand Down

0 comments on commit 6268a84

Please sign in to comment.