]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - tests/util.py
bachefs-tools: Fix broken test code.
[bcachefs-tools-debian] / 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()