chiark / gitweb /
ResponseConsumer: move _resp initialisation to superclass constructor (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 Aug 2017 16:32:00 +0000 (17:32 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 Aug 2017 16:32:00 +0000 (17:32 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
hippotat

index 8bcd62f..abe1cae 100755 (executable)
--- a/hippotat
+++ b/hippotat
@@ -33,6 +33,7 @@ class GeneralResponseConsumer(twisted.internet.protocol.Protocol):
   def __init__(self, cl, req, resp, desc):
     self._cl = cl
     self._req = req
+    self._resp = resp
     self._desc = desc
 
   def _log(self, dflag, msg, **kwargs):
@@ -79,7 +80,6 @@ class ResponseConsumer(GeneralResponseConsumer):
 class ErrorResponseConsumer(GeneralResponseConsumer):
   def __init__(self, cl, req, resp):
     super().__init__(cl, req, resp, 'ERROR-RC')
-    self._resp = resp
     self._m = b''
     try:
       self._phrase = resp.phrase.decode('utf-8')