holger krekel
2020-03-25 07:48:21 +01:00
parent 57f879a6ba
commit 2a34022619
6 changed files with 56 additions and 25 deletions

View File

@@ -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:

View File

@@ -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)