main: fix pyflakes warning.
pep8 wants the functions written as defs, not lambdas, but pyflakes complains if we redefine the same function. Change the code to define two functions and use a ternary expression to select the one we want. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
0d9604b987
commit
8710698880
1 changed files with 5 additions and 4 deletions
|
|
@ -1137,12 +1137,13 @@ def export_from(db, table, dbtype):
|
|||
|
||||
def f(x):
|
||||
return True
|
||||
|
||||
def g(x):
|
||||
return x.table == table
|
||||
if table is None and dbtype == "csv":
|
||||
raise newfol.exception.NewfolError(_("A table is required for csv"))
|
||||
if table is not None:
|
||||
def f(x):
|
||||
x.table == table
|
||||
vault.store(db.records(f))
|
||||
func = f if table is None else g
|
||||
vault.store(db.records(func))
|
||||
|
||||
|
||||
def parse_args(args):
|
||||
|
|
|
|||
Loading…
Reference in a new issue