donors2csv: Check for import errors as early as possible.
This has to be done before argument parsing because that uses import2ledger.strparse.
This commit is contained in:
parent
2e2c783657
commit
8cffed1c68
1 changed files with 1 additions and 2 deletions
|
@ -740,8 +740,6 @@ def setup_logger(logger, loglevel, stream):
|
|||
logger.setLevel(loglevel)
|
||||
|
||||
def main(arglist=None, stdout=sys.stdout, stderr=sys.stderr):
|
||||
args = parse_arguments(arglist)
|
||||
|
||||
if ENTITY_HOOK is None:
|
||||
print(
|
||||
"Error: Failed to find the import2ledger module for supporting code.",
|
||||
|
@ -752,6 +750,7 @@ def main(arglist=None, stdout=sys.stdout, stderr=sys.stderr):
|
|||
)
|
||||
return 4
|
||||
|
||||
args = parse_arguments(arglist)
|
||||
setup_logger(logger, args.loglevel, stderr)
|
||||
payees = PayeeCache()
|
||||
|
||||
|
|
Loading…
Reference in a new issue