comparison mercurial/keepalive.py @ 17700:5b1b0e4e6902

keepalive: drop python 2.2 legacy code
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 02 Oct 2012 14:27:13 -0700
parents e7cfe3587ea4
children 681f7b9213a4
comparison
equal deleted inserted replaced
17694:fa714f3ed298 17700:5b1b0e4e6902
375 # Both readline and readlines have been stolen with almost no 375 # Both readline and readlines have been stolen with almost no
376 # modification from socket.py 376 # modification from socket.py
377 377
378 378
379 def __init__(self, sock, debuglevel=0, strict=0, method=None): 379 def __init__(self, sock, debuglevel=0, strict=0, method=None):
380 if method: # the httplib in python 2.3 uses the method arg 380 httplib.HTTPResponse.__init__(self, sock, debuglevel, method)
381 httplib.HTTPResponse.__init__(self, sock, debuglevel, method)
382 else: # 2.2 doesn't
383 httplib.HTTPResponse.__init__(self, sock, debuglevel)
384 self.fileno = sock.fileno 381 self.fileno = sock.fileno
385 self.code = None 382 self.code = None
386 self._rbuf = '' 383 self._rbuf = ''
387 self._rbufsize = 8096 384 self._rbufsize = 8096
388 self._handler = None # inserted by the handler later 385 self._handler = None # inserted by the handler later