summaryrefslogtreecommitdiff
path: root/tests/util.py
diff options
context:
space:
mode:
authorJustin Husted <sigstop@gmail.com>2019-12-28 15:39:20 -0800
committerJustin Husted <sigstop@gmail.com>2019-12-28 15:54:34 -0800
commit4d5e1942bd8c219a60442c0a37799341f20bc66f (patch)
tree58acebb41a5f853a06dcce4551c2bbd49289e17f /tests/util.py
parent17a7161dbe14489c424eab4885dd706ab77dc13f (diff)
bachefs-tools: Fix broken test code.
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>
Diffstat (limited to 'tests/util.py')
-rw-r--r--tests/util.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/util.py b/tests/util.py
index a9e97464..c96f2eeb 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -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()