mirror of https://github.com/CIRCL/lookyloo
fix: More exceptions catching for the the new caching method
parent
159d444b20
commit
f886b8676b
|
@ -78,7 +78,6 @@ class AsyncCapture(AbstractManager):
|
||||||
entries = self.lacus.get_capture(uuid)
|
entries = self.lacus.get_capture(uuid)
|
||||||
if entries['status'] == CaptureStatusPy.DONE:
|
if entries['status'] == CaptureStatusPy.DONE:
|
||||||
break
|
break
|
||||||
|
|
||||||
if uuid is None:
|
if uuid is None:
|
||||||
self.unset_running()
|
self.unset_running()
|
||||||
return
|
return
|
||||||
|
|
|
@ -857,7 +857,7 @@ def _prepare_capture_template(user_ua: Optional[str], predefined_url: Optional[s
|
||||||
@app.route('/recapture/<string:tree_uuid>', methods=['GET'])
|
@app.route('/recapture/<string:tree_uuid>', methods=['GET'])
|
||||||
def recapture(tree_uuid: str):
|
def recapture(tree_uuid: str):
|
||||||
cache = lookyloo.capture_cache(tree_uuid)
|
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'),
|
return _prepare_capture_template(user_ua=request.headers.get('User-Agent'),
|
||||||
predefined_url=cache.url)
|
predefined_url=cache.url)
|
||||||
flash(f'Unable to find the capture {tree_uuid} in the cache.', 'error')
|
flash(f'Unable to find the capture {tree_uuid} in the cache.', 'error')
|
||||||
|
|
Loading…
Reference in New Issue