diff --git a/newfol b/newfol index 9076eb2..e2e51ac 100755 --- a/newfol +++ b/newfol @@ -1012,12 +1012,12 @@ def import_into(db, dtbname, dbtype, minfields=0, strict=False, identity=False): def export_from(db, table, dbtype): vault = filemanip.FileStorage(dbtype, sys.stdout) - recs = db.records() + f = lambda x: True if table is None and dbtype == "csv": raise newfol.exception.NewfolError("A table is required for csv") if table is not None: - recs = db.records(lambda x: x.table == table) - vault.store(recs) + f = lambda x: x.table == table + vault.store(db.records(f)) def parse_args(args): parser = argparse.ArgumentParser(description="store and manipulate fol")