Make socket.getservbyname test optional on socket module having that
attribute. Jython does not have this function. Closes SF patch #403667.
This commit is contained in:
parent
6a12d8d3b4
commit
6870bba459
|
@ -83,6 +83,7 @@ for name in all_host_names:
|
||||||
else:
|
else:
|
||||||
print 'FQDN not found'
|
print 'FQDN not found'
|
||||||
|
|
||||||
|
if hasattr(socket, 'getservbyname'):
|
||||||
print socket.getservbyname('telnet', 'tcp')
|
print socket.getservbyname('telnet', 'tcp')
|
||||||
try:
|
try:
|
||||||
socket.getservbyname('telnet', 'udp')
|
socket.getservbyname('telnet', 'udp')
|
||||||
|
|
Loading…
Reference in New Issue