]> err.no Git - dak/commitdiff
Do not fail on missing DB connection
authorLuca Falavigna <dktrkranz@debian.org>
Sun, 5 Jun 2011 22:36:57 +0000 (22:36 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Sun, 5 Jun 2011 22:36:57 +0000 (22:36 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
dak/show_new.py

index 194559c2076f70ccead7159aa7c37c3cb8971e49..ae87b001b9aaf9fa8d8bed17c2fafa7bd8d48586 100755 (executable)
@@ -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)))