-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give pserve the ability top open server in browser #1533
Conversation
url = 'http://{host}:{port}/'.format(**context.config()) | ||
time.sleep(1) | ||
webbrowser.open(url) | ||
threading.Thread(target=open_browser).start() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we mark the thread as detached so that it doesn't block the process from terminating?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
24f6288
to
5296842
Compare
I'm amazed to see that the |
I'm going back and forth on the cli option names |
|
|
Maybe |
Yeah I can't think of something that |
5296842
to
91fbe78
Compare
E.g.: pserve app.ini --browser or: pserve app.ini -b
91fbe78
to
8dd9708
Compare
Cool, updated. |
Give pserve the ability top open server in browser
Awesome! Thanks! |
This change does not respect --server-name option. It only works when server name is 'main' (default). |
@marc1n Sure, if you would like to submit a PR fixing this it'd be accepted. |
Fixing PR Pylons#1533: Setting pserve options --server-name SERVER-NAME and --browser, when SERVER-NAME is different than 'main' caused error : "LookupError: No section 'main' (prefixed by 'server') found in config ..."
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"
E.g.:
or:
Cc: @sontek, @mmerickel, @mcdonc