From bc66a314c4f022f6106008ccdbd38d41168f8f36 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Thu, 13 Feb 2025 09:38:20 +0100 Subject: [PATCH] logdif.py: leave on every input except bare return Change-Id: I3d53c7b45fb9ef09a61be5af13a2cdc4d32d5c7d --- logdif.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/logdif.py b/logdif.py index a4788ed..755c489 100644 --- a/logdif.py +++ b/logdif.py @@ -96,12 +96,14 @@ def print_commit(line): print(' '.join(output), title) cnt[0] += 1 if cnt[0] % 50 == 0: - input(f' {br0:11s} {br1:11s}') + if input(f' {br0:11s} {br1:11s}'): + raise StopIteration() (br0, log0), (br1, log1) = list(log_no.items()) no1 = 0 -for no0, line0 in enumerate(log0): +try: + for no0, line0 in enumerate(log0): if line0[1]: # line not yet printed infodict = commits[line0[1]] if len(infodict) > 1: # found a match @@ -114,3 +116,5 @@ for no0, line0 in enumerate(log0): print_commit(line1) no1 = no1end print_commit(line0) +except StopIteration: + pass