From 75f82bf73462eb3ea9520e6cf0b781aecbe03a92 Mon Sep 17 00:00:00 2001
From: nejucomo <nejucomo@gmail.com>
Date: Sat, 31 May 2008 19:05:41 -0700
Subject: [PATCH] fuse_a: Fix a bug in test cleanup code.

---
 contrib/fuse_a/runtests.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/fuse_a/runtests.py b/contrib/fuse_a/runtests.py
index 5946c702..b050856c 100644
--- a/contrib/fuse_a/runtests.py
+++ b/contrib/fuse_a/runtests.py
@@ -212,8 +212,10 @@ class SystemTest (object):
         thispath = os.path.abspath(sys.argv[0])
         thisdir = os.path.dirname(thispath)
         fusescript = os.path.join(thisdir, 'tahoe_fuse.py')
+        proc = None
         try:
-            proc = subprocess.Popen([fusescript,
+            proc = subprocess.Popen(['python',
+                                     fusescript,
                                      mp,
                                      '-f',
                                      '--basedir', self.clientbase])
@@ -227,7 +229,7 @@ class SystemTest (object):
         finally:
             print '\n*** Cleaning up system test'
 
-            if proc.poll() is None:
+            if proc is not None and proc.poll() is None:
                 print 'Killing fuse interface.'
                 os.kill(proc.pid, signal.SIGTERM)
                 print 'Waiting for the fuse interface to exit.'
-- 
2.45.2