From 2969e2c1c9f3f3379377f03784bfb07ced6bd975 Mon Sep 17 00:00:00 2001
From: juga0 <juga@riseup.net>
Date: Sat, 21 Mar 2020 15:00:44 +0000
Subject: [PATCH] chg: resultdump: Add missing attrs to errors

---
 sbws/lib/resultdump.py | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/sbws/lib/resultdump.py b/sbws/lib/resultdump.py
index a7c971fa..9792fdee 100644
--- a/sbws/lib/resultdump.py
+++ b/sbws/lib/resultdump.py
@@ -584,7 +584,14 @@ class ResultErrorSecondRelay(ResultError):
         return ResultErrorSecondRelay(
             Result.Relay(
                 d['fingerprint'], d['nickname'], d['address'],
-                d['master_key_ed25519']),
+                d['master_key_ed25519'],
+                relay_in_recent_consensus=  # noqa
+                    d.get('relay_in_recent_consensus', None),  # noqa
+                relay_recent_measurement_attempt=  # noqa
+                    d.get('relay_recent_measurement_attempt', None),  # noqa
+                relay_recent_priority_list=  # noqa
+                    d.get('relay_recent_priority_list', None),  # noqa
+                ),
             d['circ'], d['dest_url'], d['scanner'],
             msg=d['msg'], t=d['time'])
 
@@ -619,8 +626,15 @@ class ResultErrorDestination(ResultError):
         return ResultErrorSecondRelay(
             Result.Relay(
                 d['fingerprint'], d['nickname'], d['address'],
-                d['master_key_ed25519']),
-            d['circ'], d['dest_url'], d['scanner'],
+                d['master_key_ed25519'],
+                d['circ'], d['dest_url'], d['scanner'],
+                relay_in_recent_consensus=  # noqa
+                    d.get('relay_in_recent_consensus', None),  # noqa
+                relay_recent_measurement_attempt=  # noqa
+                    d.get('relay_recent_measurement_attempt', None),  # noqa
+                relay_recent_priority_list=  # noqa
+                    d.get('relay_recent_priority_list', None),  # noqa
+                ),
             msg=d['msg'], t=d['time'])
 
     def to_dict(self):
-- 
GitLab