Skip to content

Commit

Permalink
Fixed --browser behaviour when --server-name provided
Browse files Browse the repository at this point in the history
Fixed PR Pylons#1533. Calling:
   pserve --server-name abc --browser app.ini
caused error : "LookupError: No section 'main' (prefixed by 'server') found in config app.ini"
  • Loading branch information
marc1n committed Jan 26, 2016
1 parent 6f25929 commit 99d06f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyramid/scripts/pserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# lib/site.py

import atexit
import ctypes
import ctypes.
import errno
import logging
import optparse
Expand Down Expand Up @@ -391,7 +391,7 @@ def serve():

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)
Expand Down

0 comments on commit 99d06f3

Please sign in to comment.