[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master 2/3] Do not fail on missing DB connection



Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
---
 dak/show_new.py |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dak/show_new.py b/dak/show_new.py
index 194559c..ae87b00 100755
--- a/dak/show_new.py
+++ b/dak/show_new.py
@@ -279,12 +279,10 @@ def main():
     pool = DakProcessPool()
     p = pool.map_async(do_pkg, changes_files)
     pool.close()
-    try:
-        p.get(timeout=600)
-    except TimeoutError:
-        for htmlfile in htmlfiles_to_process:
-            with open(htmlfile, "w") as fd:
-                fd.write("Timed out while processing")
+    p.wait(timeout=600)
+    for htmlfile in htmlfiles_to_process:
+        with open(htmlfile, "w") as fd:
+            fd.write("Timed out while processing")
 
     files = set(os.listdir(cnf["Show-New::HTMLPath"]))
     to_delete = filter(lambda x: x.endswith(".html"), files.difference(set(sources)))
-- 
1.7.2.5



Reply to: