Handle exceptions in scanning loop.

This commit is contained in:
Michał Górny 2012-06-14 12:38:52 +02:00
parent 7cbe517a70
commit 5af479fea8

View File

@ -61,7 +61,11 @@ def scan_upstream_urls(cpv, urls, on_progress):
# Try normal scan # Try normal scan
if CONFIG["scan-dir"]: if CONFIG["scan-dir"]:
try:
versions.extend(handlers.scan(cpv, url)) versions.extend(handlers.scan(cpv, url))
except Exception as e:
output.ewarn("Handler failed: [%s] %s"
% (e.__class__.__name__, e.message))
if versions and CONFIG['oneshot']: if versions and CONFIG['oneshot']:
break break