##// END OF EJS Templates
linelog: be more careful about types before looking for _target attribute...
Augie Fackler -
r43774:14e374d4 default
parent child Browse files
Show More
@@ -278,8 +278,14 b' class linelog(object):'
278 fakejge = _decodeone(buf, 0)
278 fakejge = _decodeone(buf, 0)
279 if isinstance(fakejge, _jump):
279 if isinstance(fakejge, _jump):
280 maxrev = 0
280 maxrev = 0
281 elif isinstance(fakejge, (_jge, _jl)):
282 maxrev = fakejge._cmprev
281 else:
283 else:
282 maxrev = fakejge._cmprev
284 raise LineLogError(
285 'Expected one of _jump, _jge, or _jl. Got %s.'
286 % type(fakejge).__name__
287 )
288 assert isinstance(fakejge, (_jump, _jge, _jl)) # help pytype
283 numentries = fakejge._target
289 numentries = fakejge._target
284 if expected != numentries:
290 if expected != numentries:
285 raise LineLogError(
291 raise LineLogError(
General Comments 0
You need to be logged in to leave comments. Login now