fix version different issue, now checking two protocol versions before erroring out

This commit is contained in:
Erik Kristensen 2010-09-29 19:59:42 -04:00
parent 1126302122
commit d7eaa89ae3
2 changed files with 4 additions and 3 deletions

View File

@ -1263,10 +1263,10 @@ class MythBEConn( object ):
def check_version(self):
res = self.backendCommand('MYTH_PROTO_VERSION %s' \
% PROTO_VERSION).split(BACKEND_SEP)
if res[0] == 'REJECT':
if res[0] == 'REJECT' and res[1] != PROTO_VERSION_2:
self.log(MythLog.IMPORTANT|MythLog.NETWORK,
"Backend has version %s, and we speak %d" %\
(res[1], PROTO_VERSION))
"Backend has version %s, and we speak %d (%d)" %\
(res[1], PROTO_VERSION, PROTO_VERSION_2))
raise MythBEError(MythError.PROTO_MISMATCH,
int(res[1]), PROTO_VERSION)

View File

@ -9,5 +9,6 @@ SCHEMA_VERSION = 1254
MVSCHEMA_VERSION = 1032
NVSCHEMA_VERSION = 1004
PROTO_VERSION = 56
PROTO_VERSION_2 = 23056
PROGRAM_FIELDS = 47
BACKEND_SEP = '[]:[]'