[Piuparts-commits] [piuparts] 03/06: dwke: keep sections in a deque

Holger Levsen holger at layer-acht.org
Thu Dec 14 20:17:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 315f21674ed5851b5ef041c9428e5893a8f68aba
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Nov 27 21:03:31 2017 +0100

    dwke: keep sections in a deque
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 master-bin/detect_well_known_errors.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/master-bin/detect_well_known_errors.py b/master-bin/detect_well_known_errors.py
index 0e924a8..1c448dc 100644
--- a/master-bin/detect_well_known_errors.py
+++ b/master-bin/detect_well_known_errors.py
@@ -26,6 +26,7 @@ import time
 import logging
 import argparse
 import fcntl
+from collections import deque
 
 import piupartslib
 from piupartslib.conf import MissingSection
@@ -98,7 +99,9 @@ def detect_well_known_errors(sections, config, problem_list, recheck, recheck_fa
 
     total_del = 0
     total_add = 0
-    for section in sections:
+    todo = deque([(s, 0) for s in sections])
+    while len(todo):
+        (section, next_try) = todo.popleft()
         try:
             (del_cnt, add_cnt) = \
                 process_section(section, config, problem_list,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list