move self.objects declaration from RC._fromFile() to RC.__init__()
This commit is contained in:
parent
9c7fdbd6e3
commit
6dcb343243
|
@ -30,6 +30,8 @@ class Record:
|
|||
|
||||
class RecordCollection():
|
||||
def __init__(self, file):
|
||||
self.objects = {}
|
||||
|
||||
with filewrapper(file, "r") as fd:
|
||||
self._fromFile(fd)
|
||||
self._parent()
|
||||
|
@ -37,7 +39,6 @@ class RecordCollection():
|
|||
|
||||
def _fromFile(self, fd):
|
||||
lines = [i.rstrip() for i in fd.readlines()]
|
||||
self.objects = {}
|
||||
current = Record()
|
||||
|
||||
for i in lines:
|
||||
|
|
Loading…
Reference in New Issue