From f66776c9bb16e99b228ba59a32e0b6ac018dc5bb Mon Sep 17 00:00:00 2001 From: randomuser Date: Mon, 22 Nov 2021 18:40:27 -0600 Subject: [PATCH] close fd in RecordCollection.__init__() --- record.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/record.py b/record.py index b5df8d3..8f4f054 100644 --- a/record.py +++ b/record.py @@ -33,6 +33,8 @@ class RecordCollection(): self._fromFile(fd) self._parent() + fd.close() + def _fromFile(self, fd): lines = [i.rstrip() for i in fd.readlines()] self.objects = {}