fix: Catch exception when the tree has too many redirects.

pull/184/head
Raphaël Vinot 2021-03-12 18:20:17 +01:00
parent b3541e0e78
commit 8c656062b9
1 changed files with 2 additions and 0 deletions

View File

@ -143,6 +143,8 @@ class Lookyloo():
self.indexing.index_categories_capture(capture_uuid, categories)
except Har2TreeError as e:
raise NoValidHarFile(e.message)
except RecursionError as e:
raise NoValidHarFile(f'Tree too deep, probably a recursive refresh: {e}.\n Append /export to the URL to get the files.')
with (capture_dir / 'tree.pickle').open('wb') as _p:
pickle.dump(ct, _p)