Don't take minor version into account when checking serialized data compatiblity.

This commit is contained in:
Aldo Cortesi 2013-07-13 14:44:09 +12:00
parent 9febc0813f
commit 55f7e8d5b9
2 changed files with 3 additions and 2 deletions

View File

@ -790,6 +790,7 @@ class Response(HTTPMsg):
cookies.append((cookie_name, (cookie_value, cookie_parameters))) cookies.append((cookie_name, (cookie_value, cookie_parameters)))
return dict(cookies) return dict(cookies)
class ClientDisconnect: class ClientDisconnect:
""" """
A client disconnection event. A client disconnection event.
@ -1654,7 +1655,7 @@ class FlowReader:
try: try:
while 1: while 1:
data = tnetstring.load(self.fo) data = tnetstring.load(self.fo)
if tuple(data["version"]) != version.IVERSION: if tuple(data["version"][:1]) != version.IVERSION[:1]:
v = ".".join(str(i) for i in data["version"]) v = ".".join(str(i) for i in data["version"])
raise FlowReadError("Incompatible serialized data version: %s"%v) raise FlowReadError("Incompatible serialized data version: %s"%v)
off = self.fo.tell() off = self.fo.tell()

View File

@ -88,7 +88,7 @@ class ServerConnection(tcp.TCPClient):
def terminate(self): def terminate(self):
try: try:
self.wfile.flush() self.wfile.flush()
except IOError: except IOError: # pragma: no cover
pass pass
try: try:
self.connection.close() self.connection.close()