fix: More exceptions catching for the the new caching method

pull/526/head
Raphaël Vinot 2022-09-26 20:55:16 +02:00
parent 159d444b20
commit f886b8676b
2 changed files with 1 additions and 2 deletions

View File

@ -78,7 +78,6 @@ class AsyncCapture(AbstractManager):
entries = self.lacus.get_capture(uuid)
if entries['status'] == CaptureStatusPy.DONE:
break
if uuid is None:
self.unset_running()
return

View File

@ -857,7 +857,7 @@ def _prepare_capture_template(user_ua: Optional[str], predefined_url: Optional[s
@app.route('/recapture/<string:tree_uuid>', methods=['GET'])
def recapture(tree_uuid: str):
cache = lookyloo.capture_cache(tree_uuid)
if cache:
if cache and hasattr(cache, 'url'):
return _prepare_capture_template(user_ua=request.headers.get('User-Agent'),
predefined_url=cache.url)
flash(f'Unable to find the capture {tree_uuid} in the cache.', 'error')