]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
fuse_a: Fix a bug in test cleanup code.
authornejucomo <nejucomo@gmail.com>
Sun, 1 Jun 2008 02:05:41 +0000 (19:05 -0700)
committernejucomo <nejucomo@gmail.com>
Sun, 1 Jun 2008 02:05:41 +0000 (19:05 -0700)
contrib/fuse_a/runtests.py

index 5946c70287aa35d595804698e66b10aded11591a..b050856cb1bd9ec5165c1d2ca9156d204f01e78a 100644 (file)
@@ -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.'