From 9fa8f2246ead361141242e61abc88fa0e0abd990 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sun, 15 Nov 2015 16:21:35 +0000 Subject: [PATCH] main: clean up PEP 8 warnings. Signed-off-by: brian m. carlson --- lib/newfol/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/newfol/main.py b/lib/newfol/main.py index 88083ef..70a3bcf 100644 --- a/lib/newfol/main.py +++ b/lib/newfol/main.py @@ -1134,11 +1134,14 @@ def import_into(db, dtbname, dbtype, minfields=0, strict=False, def export_from(db, table, dbtype): vault = filemanip.FileStorage(dbtype, sys.stdout) - f = lambda x: True + + def f(x): + return True if table is None and dbtype == "csv": raise newfol.exception.NewfolError(_("A table is required for csv")) if table is not None: - f = lambda x: x.table == table + def f(x): + x.table == table vault.store(db.records(f))