mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
b8c248e4d9
In dns_hup.py, we are both importing the socket module and declaring a variable called socket. When we try to catch a socket.error exception (defined by the module), Python thinks we're referring to the variable. As the variable has no attribute called 'error', Python throws an exception, e.g.: File "./bin/python/samba/tests/dns_forwarder_helpers/dns_hub.py", line 123, in handle except socket.error as err: AttributeError: 'socket' object has no attribute 'error' We can avoid this problem by calling the variable 'sock' instead. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jan 17 15:23:23 CET 2019 on sn-devel-144