Make Schema.load a regular method.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
brian m. carlson 2014-08-05 23:04:57 +00:00
parent 42643dface
commit 26a83e68d7
No known key found for this signature in database
GPG key ID: BF535D811F52F68B

View file

@ -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: