]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
bachefs-tools: Fix broken test code.
authorJustin Husted <sigstop@gmail.com>
Sat, 28 Dec 2019 23:39:20 +0000 (15:39 -0800)
committerJustin Husted <sigstop@gmail.com>
Sat, 28 Dec 2019 23:54:34 +0000 (15:54 -0800)
A check was missing in some of the python test code, probably from a bad
cherry-pick.

Signed-off-by: Justin Husted <sigstop@gmail.com>
tests/util.py

index a9e9746441dc3a9e60ffc3449dde9172518ad849..c96f2eebac868758f78512e6a08c544e3b98acde 100644 (file)
@@ -210,10 +210,11 @@ class BFuse:
         run("fusermount3", "-zu", self.mnt)
         print("Waiting for thread to exit.")
 
-        self.thread.join(timeout)
-        if self.thread.is_alive():
-            self.proc.kill()
-            self.thread.join()
+        if self.thread:
+            self.thread.join(timeout)
+            if self.thread.is_alive():
+                self.proc.kill()
+                self.thread.join()
 
         self.thread = None
         self.ready.clear()