This commit is contained in:
Kovid Goyal 2014-08-17 20:47:17 +05:30
commit fb2bb90d3a

View File

@ -114,6 +114,9 @@ def create_service(desc, type, port, properties, add_hostname, use_ip_address=No
hostname = 'Unknown' hostname = 'Unknown'
if add_hostname: if add_hostname:
try:
desc += ' (on %s port %d)'%(hostname, port)
except:
try: try:
desc += ' (on %s)'%hostname desc += ' (on %s)'%hostname
except: except: