Skip to content

Commit

Permalink
Minor documentation fix to unix domain sockets class
Browse files Browse the repository at this point in the history
  • Loading branch information
cnelson committed Mar 11, 2015
1 parent 5519b0e commit 5d528e5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions fleet/http/unix_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,19 @@ def has_timeout(timeout): # pragma: no cover

class UnixConnectionWithTimeout(httplib.HTTPConnection):
"""
HTTPConnection subclass that supports timeouts
All timeouts are in seconds. If None is passed for timeout then
Python's default timeout for sockets will be used. See for example
the docs of socket.setdefaulttimeout():
http://docs.python.org/library/socket.html#socket.setdefaulttimeout
HTTP over UNIX Domain Sockets
"""

def __init__(self, host, port=None, strict=None, timeout=None, proxy_info=None):
httplib.HTTPConnection.__init__(self, host, port)
self.timeout = timeout

def connect(self):
"""Setup the unix domain socket.
"""Connect to the unix domain socket, which is passed to us as self.host
This is in host because the format we use for the unix domain socket is:
We don't actually connect until ``request`` because httplib2 doesn't given us the path in this method :(
http+unix://%2Fpath%2Fto%2Fsocket.sock
"""
try:
Expand Down

0 comments on commit 5d528e5

Please sign in to comment.