summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbottle.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/bottle.py b/bottle.py
index 111da5e..5d5e668 100755
--- a/bottle.py
+++ b/bottle.py
@@ -3449,7 +3449,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):
@@ -3715,8 +3719,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: