From 0863bb5602a3635abfa917fe495afc3d77162b76 Mon Sep 17 00:00:00 2001 From: "Stuart D. Gathman" Date: Mon, 25 Jul 2016 22:12:27 -0400 Subject: [PATCH] Fix spurious cleanup error. --- testutils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testutils.py b/testutils.py index 884ac60..0a3be4b 100644 --- a/testutils.py +++ b/testutils.py @@ -11,7 +11,8 @@ class AddrCacheTestCase(unittest.TestCase): self.fname = 'test.dat' def tearDown(self): - os.remove(self.fname) + if os.path.exists(self.fname): + os.remove(self.fname) def testAdd(self): cache = AddrCache(fname=self.fname)