From 6ed8664c7fd7f3b67f495015288aa78acde815e8 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Thu, 11 Oct 2007 02:20:20 -0700
Subject: [PATCH] check_memory.py: don't use self.keepalive_file until it's
 been initialized

---
 src/allmydata/test/check_memory.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/allmydata/test/check_memory.py b/src/allmydata/test/check_memory.py
index 1fd3406c..9592810c 100644
--- a/src/allmydata/test/check_memory.py
+++ b/src/allmydata/test/check_memory.py
@@ -74,6 +74,7 @@ class SystemFramework(testutil.PollMixin):
         self.tub.setServiceParent(self.sparent)
         self.mode = mode
         self.failed = False
+        self.keepalive_file = None
 
     def run(self):
         framelog = os.path.join(self.basedir, "driver.log")
@@ -142,7 +143,7 @@ class SystemFramework(testutil.PollMixin):
         # the client node will shut down in a few seconds
         #os.remove(os.path.join(self.clientdir, "suicide_prevention_hotline"))
         log.msg("shutting down SystemTest services")
-        if os.path.exists(self.keepalive_file):
+        if self.keepalive_file and os.path.exists(self.keepalive_file):
             age = time.time() - os.stat(self.keepalive_file)[stat.ST_MTIME]
             log.msg("keepalive file at shutdown was %ds old" % age)
         d = defer.succeed(None)
-- 
2.45.2