From 6bf490ead41b1b4a1087b381efbb0564ff5aacee Mon Sep 17 00:00:00 2001 From: randomuser Date: Tue, 20 Jul 2021 23:55:24 -0500 Subject: [PATCH] make db.DuckDB().__init__(self, ...) use db.DuckDB().read(self, location) for reading file data --- db.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/db.py b/db.py index 7a1bb39..083d8f1 100644 --- a/db.py +++ b/db.py @@ -2,10 +2,7 @@ class DuckDB: def __init__(self, location=None): self.location = location self.db = [] - if location != None: - fd = open(location, "r") - self.parse(fd) - fd.close() + if location != None: read(location) def parse(self, fd): lines = [i.rstrip() for i in fd.readlines()]