really necessary, and the presence of a __del__ method prevents python's
GC from breaking cyclical references (which happen on errors as HTTPError
and HTTPResponse refer to each other).
Closes #125.
args = ",".join("%s=%r" % i for i in self.__dict__.iteritems())
return "%s(%s)" % (self.__class__.__name__, args)
- def __del__(self):
- if self.buffer is not None:
- self.buffer.close()
-
class HTTPError(Exception):
"""Exception thrown for an unsuccessful HTTP request.