aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Ionite <[email protected]>2023-03-11 19:55:20 -0500
committerGravatar Ionite <[email protected]>2023-03-11 19:55:20 -0500
commit2abd6cdedb2c2d855eb31a0c6bab8c0a7a0413e3 (patch)
treec470e2754e319bc4070a4c0f6873f1c2caedd535
parentReduce file parse timeout from 8 to 5 seconds (diff)
Handle recursion error cases from glob
-rw-r--r--snekbox/nsjail.py7
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(