added option to log DC core output
This commit is contained in:
parent
ebbb07bf1a
commit
1ff039152c
|
@ -29,9 +29,19 @@ def get_control_group(ac: deltachat.account.Account):
|
|||
help="Specify backup file of your account to initialize account",
|
||||
default=" ",
|
||||
)
|
||||
@click.option(
|
||||
"--verbose",
|
||||
"-v",
|
||||
type=bool,
|
||||
is_flag=True,
|
||||
help="Show Delta Chat log output",
|
||||
default=False,
|
||||
)
|
||||
@click.pass_context
|
||||
def init(ctx, db_path, from_backup) -> None:
|
||||
def init(ctx, db_path, from_backup, verbose) -> None:
|
||||
ac = deltachat.account.Account(db_path)
|
||||
if verbose:
|
||||
ac.add_account_plugin(deltachat.events.FFIEventLogger(ac))
|
||||
if not ac.is_configured():
|
||||
if from_backup != " ":
|
||||
ac.import_all(from_backup)
|
||||
|
@ -133,9 +143,19 @@ def get_next_message_from_group(
|
|||
default=os.getenv("HOME") + "/.config/DeltaChat/verificationbot/db.sqlite",
|
||||
show_default=True,
|
||||
)
|
||||
@click.option(
|
||||
"--verbose",
|
||||
"-v",
|
||||
type=bool,
|
||||
is_flag=True,
|
||||
help="Show Delta Chat log output",
|
||||
default=False,
|
||||
)
|
||||
@click.pass_context
|
||||
def run(ctx, db_path):
|
||||
def run(ctx, db_path, verbose):
|
||||
ac = deltachat.account.Account(db_path)
|
||||
if verbose:
|
||||
ac.add_account_plugin(deltachat.events.FFIEventLogger(ac))
|
||||
if not ac.is_configured():
|
||||
ctx.fail(
|
||||
"Please run this first to initialize the bot:\n\n verificationbot init\n"
|
||||
|
|
Loading…
Reference in a new issue