From 3d1ba01cc69a6284da364b1fa0829d82331de7b5 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 6 Jan 2020 11:43:49 -0500
Subject: [PATCH] don't run this initialization in the case of init_storage
 exceptions

---
 src/_zkapauthorizer/_plugin.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/_zkapauthorizer/_plugin.py b/src/_zkapauthorizer/_plugin.py
index 3b321c7..262db77 100644
--- a/src/_zkapauthorizer/_plugin.py
+++ b/src/_zkapauthorizer/_plugin.py
@@ -184,10 +184,9 @@ def maintenance_init_storage(self, announceable_storage_servers):
     initializes the lease maintenance service.
     """
     from twisted.internet import reactor
-    try:
-        return _init_storage(self, announceable_storage_servers)
-    finally:
-        _maybe_attach_maintenance_service(reactor, self)
+    result = _init_storage(self, announceable_storage_servers)
+    _maybe_attach_maintenance_service(reactor, self)
+    return result
 _Client.init_storage = maintenance_init_storage
 
 
-- 
GitLab