From 0efddd316ac430cf79db6cd9b1145dcab4d9fdae Mon Sep 17 00:00:00 2001 From: "Stuart D. Gathman" Date: Tue, 16 Jun 2020 20:10:33 -0400 Subject: [PATCH] Fix bug found by pysrs unit tests --- Milter/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Milter/test.py b/Milter/test.py index e6906d6..52e4520 100644 --- a/Milter/test.py +++ b/Milter/test.py @@ -47,7 +47,9 @@ class TestBase(object): self._symlist = [ None, None, None, None, None, None, None ] def _close(self): - close(self.logfp) + if self.logfp: + self.logfp.close() + self.logfp = None def log(self,*msg): for i in msg: print(i,file=self.logfp,end=None)