diff options
| author | 2023-03-11 19:55:20 -0500 | |
|---|---|---|
| committer | 2023-03-11 19:55:20 -0500 | |
| commit | 2abd6cdedb2c2d855eb31a0c6bab8c0a7a0413e3 (patch) | |
| tree | c470e2754e319bc4070a4c0f6873f1c2caedd535 | |
| parent | Reduce file parse timeout from 8 to 5 seconds (diff) | |
Handle recursion error cases from glob
Diffstat (limited to '')
| -rw-r--r-- | snekbox/nsjail.py | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/snekbox/nsjail.py b/snekbox/nsjail.py index 76154ae..6f6a155 100644 --- a/snekbox/nsjail.py +++ b/snekbox/nsjail.py @@ -277,6 +277,13 @@ class NsJail:                      timeout=self.files_timeout,                  )                  log.info(f"Found {len(attachments)} files.") +            except RecursionError: +                log.info("Recursion error while parsing attachments") +                return EvalResult( +                    args, +                    None, +                    "FileParsingError: Exceeded directory depth limit while parsing attachments", +                )              except TimeoutError as e:                  log.info(f"Exceeded time limit while parsing attachments: {e}")                  return EvalResult( | 
