summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Raczyński <marc1n@users.noreply.github.com>2016-01-26 23:03:34 +0100
committerMarcin Raczyński <marc1n@users.noreply.github.com>2016-01-26 23:03:34 +0100
commit99d06f3646d8f60f8d58aba1b85b1fe1eb0b8f67 (patch)
tree296156e6877b441cb1bffe89b9ee189567822417
parent6f259290241fbe3758f3e7a37f5853b16d7d5971 (diff)
downloadpyramid-99d06f3646d8f60f8d58aba1b85b1fe1eb0b8f67.tar.gz
pyramid-99d06f3646d8f60f8d58aba1b85b1fe1eb0b8f67.tar.bz2
pyramid-99d06f3646d8f60f8d58aba1b85b1fe1eb0b8f67.zip
Fixed --browser behaviour when --server-name provided
Fixed PR #1533. Calling: pserve --server-name abc --browser app.ini caused error : "LookupError: No section 'main' (prefixed by 'server') found in config app.ini"
-rw-r--r--pyramid/scripts/pserve.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py
index 155b82bdc..6737966ba 100644
--- a/pyramid/scripts/pserve.py
+++ b/pyramid/scripts/pserve.py
@@ -9,7 +9,7 @@
# lib/site.py
import atexit
-import ctypes
+import ctypes.
import errno
import logging
import optparse
@@ -391,7 +391,7 @@ a real process manager for your processes like Systemd, Circus, or Supervisor.
if self.options.browser:
def open_browser():
- context = loadcontext(SERVER, app_spec, name=app_name, relative_to=base,
+ context = loadcontext(SERVER, app_spec, name=server_name, relative_to=base,
global_conf=vars)
url = 'http://127.0.0.1:{port}/'.format(**context.config())
time.sleep(1)