From: Daira Hopwood <daira@jacaranda.org>
Date: Thu, 3 Sep 2015 18:41:51 +0000 (+0100)
Subject: stopService does not necessarily return a Deferred.
X-Git-Url: https://git.rkrishnan.org/listings/frontends/rgr-080307.php?a=commitdiff_plain;h=7ba6082bb8e9679c85b76d0f626bc5f9a0857bc1;p=tahoe-lafs%2Ftahoe-lafs.git

stopService does not necessarily return a Deferred.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
---

diff --git a/src/allmydata/test/no_network.py b/src/allmydata/test/no_network.py
index b84a7a2e..f5578ac3 100644
--- a/src/allmydata/test/no_network.py
+++ b/src/allmydata/test/no_network.py
@@ -385,7 +385,8 @@ class GridTestMixin:
 
     def restart_client(self, i=0):
         client = self.g.clients[i]
-        d = client.stopService()
+        d = defer.succeed(None)
+        d.addCallback(lambda ign: client.stopService())
         def _make_client(ign):
             c = self.g.make_client(i, write_config=False)
             self.g.clients[i] = c