summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2012-07-30 14:19:56 +0100
committerAsk Solem <ask@celeryproject.org>2012-08-01 16:05:30 +0100
commitad422cf049d622eda55f0092f28a5ede70c20a9d (patch)
treeabff54a2502dc49fec8b4b7f82bacd6e3126d7c2
parent179756ab277f4776ee965ffa831d08adfcf4000c (diff)
downloadkombu-ad422cf049d622eda55f0092f28a5ede70c20a9d.tar.gz
Beanstalk: Use localhost by default
-rw-r--r--kombu/transport/beanstalk.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/kombu/transport/beanstalk.py b/kombu/transport/beanstalk.py
index 6745bc1e..0cdd2f98 100644
--- a/kombu/transport/beanstalk.py
+++ b/kombu/transport/beanstalk.py
@@ -105,8 +105,9 @@ class Channel(virtual.Channel):
def _open(self):
conninfo = self.connection.client
+ host = conninfo.hostname or 'localhost'
port = conninfo.port or DEFAULT_PORT
- conn = beanstalkc.Connection(host=conninfo.hostname, port=port)
+ conn = beanstalkc.Connection(host=host, port=port)
conn.connect()
return conn