bug #1462706: guard against host not having FQDN hostname
This commit is contained in:
parent
31fe35bdee
commit
4eb521e595
|
@ -1130,8 +1130,11 @@ class FileHandler(BaseHandler):
|
|||
names = None
|
||||
def get_names(self):
|
||||
if FileHandler.names is None:
|
||||
try:
|
||||
FileHandler.names = (socket.gethostbyname('localhost'),
|
||||
socket.gethostbyname(socket.gethostname()))
|
||||
except socket.gaierror:
|
||||
FileHandler.names = (socket.gethostbyname('localhost'),)
|
||||
return FileHandler.names
|
||||
|
||||
# not entirely sure what the rules are here
|
||||
|
|
Loading…
Reference in New Issue