Hacker News new | ask | show | jobs
by nadams 3915 days ago
Not to be that guy - but did you test this?

    parameters = {'hostname': self.hostname, 'myip': myip}
Change to:

    parameters = {'hostname': self.hostname, 'myip': ip}
Change:

    for host in hosts:
        print(host)
To:

    for host in hosts:
        host.update(myip)
        print(host)
1 comments

Good catch on the myip vs ip syntax error. It worked because of the myip global. The later change isn't required because the constructor calls the update. I may go ahead and adopt your update suggestion to make it clearer what is actually going on. Thanks!