I developed a package for post-installation configuration of Windows on my network, initially on WAPT 1.8.
The idea is to configure a newly installed workstation by finding its name from its IP address using a reverse DNS lookup.
For that, I use the dnspython module.
Since upgrading to WAPT 2.0, the installation returns an error: AttributeError: 'GenericRdata' object has no attribute 'target'
This error refers to a piece of code:
Code: Select all
def findmachinename(ip):
pass
no = dns.reversename.from_address(ip)
answers = dns.resolver.query(no, 'PTR')
for rdata in answers:
nom = rdata
nommachine = nom.target[0].decode("utf-8")
return nommachineAny ideas?
