From 975bc64fd09cbd7acee2b831aaf9a3d5b85da04d Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 1 Nov 2013 17:45:43 -0500 Subject: [PATCH] fixed 1760:option -p or --port not working at command line --- VERSION | 2 +- gluon/shell.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 9888ea3f..c4f99942 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.7.4-stable+timestamp.2013.10.31.10.21.05 +Version 2.7.4-stable+timestamp.2013.11.01.17.44.38 diff --git a/gluon/shell.py b/gluon/shell.py index 7a56e9b8..2c1e0f70 100644 --- a/gluon/shell.py +++ b/gluon/shell.py @@ -131,7 +131,9 @@ def env( request.function = f or 'index' response.view = '%s/%s.html' % (request.controller, request.function) - request.env.http_host = '127.0.0.1:8000' + ip = global_settings.cmd_options.ip + port = global_settings.cmd_options.port + request.env.http_host = '%s:%s' % (ip,port) request.env.remote_addr = '127.0.0.1' request.env.web2py_runtime_gae = global_settings.web2py_runtime_gae