diff options
-rwxr-xr-x | bottle.py | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -3448,7 +3448,11 @@ class GunicornServer(ServerAdapter): def run(self, handler): from gunicorn.app.base import Application - config = {'bind': "%s:%d" % (self.host, int(self.port))} + if self.host.startswith("unix:"): + config = {'bind': self.host} + else: + config = {'bind': "%s:%d" % (self.host, self.port)} + config.update(self.options) class GunicornApplication(Application): @@ -3714,8 +3718,11 @@ def run(app=None, if not server.quiet: _stderr("Bottle v%s server starting up (using %s)...\n" % (__version__, repr(server))) - _stderr("Listening on http://%s:%d/\n" % - (server.host, server.port)) + if server.host.startswith("unix:"): + _stderr("Listening on %s\n" % server.host) + else: + _stderr("Listening on http://%s:%d/\n" % + (server.host, server.port)) _stderr("Hit Ctrl-C to quit.\n\n") if reloader: |