Browse Source

Client.HTTPWithTimeout: fixed constructor's docstring and comments

-named the diferences with respect to the overriden method
-fixed wrong reference to class in module 'httplib'
-added documentation of param 'timeout'
-removed redundant comments
main
German Larrain 11 years ago
parent
commit
e74c636ca2
1 changed files with 8 additions and 6 deletions
  1. +8
    -6
      src/SOAPpy/Client.py

+ 8
- 6
src/SOAPpy/Client.py View File

@@ -135,17 +135,19 @@ class HTTPWithTimeout(HTTP):

_connection_class = HTTPConnectionWithTimeout

## this __init__ copied from httplib.HTML class
def __init__(self, host='', port=None, strict=None, timeout=None):
"Provide a default host, since the superclass requires one."
"""Slight modification of superclass (httplib.HTTP) constructor.

# some joker passed 0 explicitly, meaning default port
The only change is that arg ``timeout`` is also passed in the
initialization of :attr:`_connection_class`.

:param timeout: for the socket connection (seconds); None to disable
:type timeout: float or None

"""
if port == 0:
port = None

# Note that we may pass an empty string as the host; this will throw
# an error when we attempt to connect. Presumably, the client code
# will call connect before then, with a proper host.
self._setup(self._connection_class(host, port, strict, timeout))

class HTTPTransport:


Loading…
Cancel
Save