oops, fix it properly

This commit is contained in:
Brian Warner 2017-04-23 16:33:42 -04:00
parent 876dea8297
commit c84939744f

View File

@ -244,7 +244,7 @@ class Connection(protocol.Protocol, policies.TimeoutMixin):
if self.state == "records": if self.state == "records":
return self.dataReceivedRECORDS() return self.dataReceivedRECORDS()
if self.state == "hung up": if self.state == "hung up":
pass return
if isinstance(self.state, Exception): # for tests if isinstance(self.state, Exception): # for tests
raise self.state raise self.state
raise ValueError("internal error: unknown state %s" % (self.state,)) raise ValueError("internal error: unknown state %s" % (self.state,))