Basic fixes (without code modification)main
@@ -1,5 +1,3 @@ | |||||
from __future__ import nested_scopes | |||||
""" | """ | ||||
################################################################################ | ################################################################################ | ||||
# | # | ||||
@@ -40,7 +38,10 @@ from __future__ import nested_scopes | |||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
# | # | ||||
################################################################################ | ################################################################################ | ||||
""" | """ | ||||
from __future__ import nested_scopes | |||||
ident = '$Id: Client.py 1496 2010-03-04 23:46:17Z pooryorick $' | ident = '$Id: Client.py 1496 2010-03-04 23:46:17Z pooryorick $' | ||||
from version import __version__ | from version import __version__ | ||||
@@ -134,17 +135,19 @@ class HTTPWithTimeout(HTTP): | |||||
_connection_class = HTTPConnectionWithTimeout | _connection_class = HTTPConnectionWithTimeout | ||||
## this __init__ copied from httplib.HTML class | |||||
def __init__(self, host='', port=None, strict=None, timeout=None): | 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. | |||||
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 | |||||
# some joker passed 0 explicitly, meaning default port | |||||
""" | |||||
if port == 0: | if port == 0: | ||||
port = None | 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)) | self._setup(self._connection_class(host, port, strict, timeout)) | ||||
class HTTPTransport: | class HTTPTransport: | ||||
@@ -1,5 +1,3 @@ | |||||
from __future__ import nested_scopes | |||||
""" | """ | ||||
GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov> | GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov> | ||||
@@ -43,7 +41,9 @@ GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov> | |||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
# | # | ||||
################################################################################ | ################################################################################ | ||||
""" | """ | ||||
from __future__ import nested_scopes | |||||
ident = '$Id: GSIServer.py 1468 2008-05-24 01:55:33Z warnes $' | ident = '$Id: GSIServer.py 1468 2008-05-24 01:55:33Z warnes $' | ||||
from version import __version__ | from version import __version__ | ||||
@@ -1,5 +1,3 @@ | |||||
from __future__ import nested_scopes | |||||
""" | """ | ||||
################################################################################ | ################################################################################ | ||||
# | # | ||||
@@ -40,7 +38,9 @@ from __future__ import nested_scopes | |||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
# | # | ||||
################################################################################ | ################################################################################ | ||||
""" | """ | ||||
from __future__ import nested_scopes | |||||
ident = '$Id: NS.py 1468 2008-05-24 01:55:33Z warnes $' | ident = '$Id: NS.py 1468 2008-05-24 01:55:33Z warnes $' | ||||
from version import __version__ | from version import __version__ | ||||
@@ -1,5 +1,3 @@ | |||||
from __future__ import nested_scopes | |||||
""" | """ | ||||
################################################################################ | ################################################################################ | ||||
# | # | ||||
@@ -40,7 +38,9 @@ from __future__ import nested_scopes | |||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
# | # | ||||
################################################################################ | ################################################################################ | ||||
""" | """ | ||||
from __future__ import nested_scopes | |||||
ident = '$Id: Server.py 1468 2008-05-24 01:55:33Z warnes $' | ident = '$Id: Server.py 1468 2008-05-24 01:55:33Z warnes $' | ||||
from version import __version__ | from version import __version__ | ||||
@@ -1,5 +1,3 @@ | |||||
from __future__ import nested_scopes | |||||
""" | """ | ||||
################################################################################ | ################################################################################ | ||||
# Copyright (c) 2003, Pfizer | # Copyright (c) 2003, Pfizer | ||||
@@ -33,7 +31,9 @@ from __future__ import nested_scopes | |||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
# | # | ||||
################################################################################ | ################################################################################ | ||||
""" | """ | ||||
from __future__ import nested_scopes | |||||
ident = '$Id: Types.py 1496 2010-03-04 23:46:17Z pooryorick $' | ident = '$Id: Types.py 1496 2010-03-04 23:46:17Z pooryorick $' | ||||
from version import __version__ | from version import __version__ | ||||