mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
refine example doc and address https://github.com/deltachat/deltachat-core-rust/pull/1307#pullrequestreview-380876587
This commit is contained in:
@@ -4,6 +4,7 @@ from . import capi, const, hookspec
|
||||
from .capi import ffi
|
||||
from .account import Account # noqa
|
||||
from . import eventlogger
|
||||
from .hookspec import account_hookimpl, global_hookimpl # noqa
|
||||
|
||||
from pkg_resources import get_distribution, DistributionNotFound
|
||||
try:
|
||||
@@ -104,14 +105,13 @@ def run_cmdline(argv=None, account_plugins=None):
|
||||
argv = sys.argv
|
||||
|
||||
parser = argparse.ArgumentParser(prog=argv[0] if argv else None)
|
||||
parser.add_argument("db", action="store", help="database file")
|
||||
parser.add_argument("--show-ffi", action="store_true", help="show low level ffi events")
|
||||
parser.add_argument("--db", action="store", help="database file")
|
||||
parser.add_argument("--email", action="store", help="email address")
|
||||
parser.add_argument("--password", action="store", help="password")
|
||||
|
||||
args = parser.parse_args(argv[1:])
|
||||
|
||||
assert args.db, "you must specify --db"
|
||||
ac = Account(args.db)
|
||||
|
||||
if args.show_ffi:
|
||||
|
||||
@@ -257,9 +257,9 @@ def acfactory(pytestconfig, tmpdir, request, session_liveconfig, datadir):
|
||||
sys.executable,
|
||||
fn,
|
||||
"--show-ffi",
|
||||
"--db", bot_ac.db_path,
|
||||
"--email", bot_cfg["addr"],
|
||||
"--password", bot_cfg["mail_pw"],
|
||||
bot_ac.db_path,
|
||||
]
|
||||
print("$", " ".join(args))
|
||||
popen = subprocess.Popen(
|
||||
@@ -299,7 +299,6 @@ class BotProcess:
|
||||
if not line:
|
||||
break
|
||||
line = line.strip()
|
||||
print("QUEUING:", repr(line))
|
||||
self.stdout_queue.put(line)
|
||||
finally:
|
||||
self.stdout_queue.put(None)
|
||||
|
||||
Reference in New Issue
Block a user