From 666299c471ff2319ff0967f38516198afbe027b2 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 16 Jul 2012 20:58:12 -0500 Subject: [PATCH] fixed socket.gaierror, thanks Carlos --- VERSION | 2 +- gluon/main.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 8e894610..8f2c017e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-16 15:53:20) dev +Version 2.00.0 (2012-07-16 20:57:59) dev diff --git a/gluon/main.py b/gluon/main.py index 1dfd9fae..c24f45c8 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -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