fixed socket.gaierror, thanks Carlos

This commit is contained in:
mdipierro
2012-07-16 20:58:12 -05:00
parent 00395ba68c
commit 666299c471
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-07-16 15:53:20) dev
Version 2.00.0 (2012-07-16 20:57:59) dev
+3 -2
View File
@@ -386,8 +386,9 @@ def wsgibase(environ, responder):
local_hosts = [http_host,'::1','127.0.0.1','::ffff:127.0.0.1']
if not global_settings.web2py_runtime_gae:
local_hosts += [socket.gethostname(),
socket.gethostbyname(http_host)]
local_hosts.append(socket.gethostname())
try: local_hosts.append(socket.gethostbyname(http_host))
except socket.gaierror: pass
request.client = get_client(request.env)
request.folder = abspath('applications',
request.application) + os.sep