From f1de59c152d1f0dcb7d55e7bc5df074ea97004ed Mon Sep 17 00:00:00 2001 From: Simon Chopin Date: Mon, 20 Apr 2026 15:07:55 +0200 Subject: [PATCH] send: add a non-blocking option I personally prefer this operation to fail fast as sync operations sometimes take a *lot* of time. --- lieer/gmailieer.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lieer/gmailieer.py b/lieer/gmailieer.py index 8430cfb..88cdec4 100755 --- a/lieer/gmailieer.py +++ b/lieer/gmailieer.py @@ -193,6 +193,13 @@ def main(self): help="Read recipients from message headers. This is always done by GMail. If this option is not specified, the same addresses (as those in the headers) must be specified as additional arguments.", ) + parser_send.add_argument( + "--blocking", + action=argparse.BooleanOptionalAction, + default=True, + help="Whether the call should block on other operations on the local repository, or error out. Defaults to blocking.", + ) + parser_send.add_argument( "-f", type=str, @@ -1011,7 +1018,7 @@ def load_resume(self, f, lastid): return ResumePull.new(f, lastid) def send(self, args): - self.setup(args, args.dry_run, True, True) + self.setup(args, args.dry_run, True, args.blocking) self.remote.get_labels() msg = sys.stdin.buffer.read()