From 26a83e68d7cd2634880bcf598ff520e44bc18cb7 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 5 Aug 2014 23:04:57 +0000 Subject: [PATCH] Make Schema.load a regular method. Signed-off-by: brian m. carlson --- lib/newfol/database.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/newfol/database.py b/lib/newfol/database.py index 5814494..ca7d93f 100644 --- a/lib/newfol/database.py +++ b/lib/newfol/database.py @@ -288,11 +288,8 @@ class Schema: newrecs.append(i) vault.store(newrecs) - @staticmethod - def load(path): - sch = Schema() - sch.load_file("%s/schema" % path) - return sch + def load(self, path): + self.load_file("%s/schema" % path) def load_file(self, path): vault = newfol.filemanip.FileStorage('csv', path) @@ -397,7 +394,8 @@ class Database: @classmethod def load(klass, location, txntype=None): version = klass.read_version(location) - schema = Schema.load(location) + schema = Schema() + schema.load(location) if type(txntype) is str: schema._txntype = [txntype] elif txntype is not None: