Make Schema.load a regular method.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
42643dface
commit
26a83e68d7
1 changed files with 4 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue