Patchwork D10024: error: add `hint` attribute to `SidedataHashError`

login
register
mail settings
Submitter phabricator
Date Feb. 19, 2021, 11:15 a.m.
Message ID <differential-rev-PHID-DREV-cbmtmzd53o6ozpfvd5i7-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48338/
State Superseded
Headers show

Comments

phabricator - Feb. 19, 2021, 11:15 a.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This prevents an exception within an exception because `hint` does not exist.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10024

AFFECTED FILES
  mercurial/error.py

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -55,6 +55,7 @@ 
 
 class SidedataHashError(RevlogError):
     def __init__(self, key, expected, got):
+        self.hint = None
         self.sidedatakey = key
         self.expecteddigest = expected
         self.actualdigest = got