mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
immutable/checker.py: trap ShareVersionIncompatible too. Also, use f.check
instead of examining the value returned by f.trap, because the latter appears to squash exception types down into their base classes (i.e. since ShareVersionIncompatible is a subclass of LayoutInvalid, f.trap(Failure(ShareVersionIncompatible)) == LayoutInvalid). All this resulted in 'incompatible' shares being misclassified as 'corrupt'.
This commit is contained in:
parent
9af9d8ae35
commit
f95e9b5964
@ -141,14 +141,15 @@ class Checker(log.PrefixingLogMixin):
|
||||
rrefutil.ServerFailure,
|
||||
layout.LayoutInvalid,
|
||||
layout.RidiculouslyLargeURIExtensionBlock,
|
||||
layout.ShareVersionIncompatible,
|
||||
download.BadOrMissingHash,
|
||||
download.BadURIExtensionHashValue)
|
||||
|
||||
if failtype is DeadReferenceError:
|
||||
if f.check(DeadReferenceError):
|
||||
return (False, sharenum, 'disconnect')
|
||||
elif failtype is rrefutil.ServerFailure:
|
||||
elif f.check(rrefutil.ServerFailure):
|
||||
return (False, sharenum, 'failure')
|
||||
elif failtype is layout.ShareVersionIncompatible:
|
||||
elif f.check(layout.ShareVersionIncompatible):
|
||||
return (False, sharenum, 'incompatible')
|
||||
else:
|
||||
return (False, sharenum, 'corrupt')
|
||||
|
Loading…
x
Reference in New Issue
Block a user