diff options
author | 2022-11-21 11:04:47 -0500 | |
---|---|---|
committer | 2022-11-21 11:04:47 -0500 | |
commit | e784bf6391058c3bd8e2ccb8fa16536944930795 (patch) | |
tree | 544e2acf583006880d645c256d628d60a2aa382c | |
parent | Remove attachment size limit, added time limit (diff) |
Limit empty str filter to start of py_args
-rw-r--r-- | snekbox/nsjail.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/snekbox/nsjail.py b/snekbox/nsjail.py index d4255e6..0605e43 100644 --- a/snekbox/nsjail.py +++ b/snekbox/nsjail.py @@ -205,8 +205,9 @@ class NsJail: "--", self.config.exec_bin.path, *self.config.exec_bin.arg, - # Filter out empty strings (causes issues with python cli) - *(arg for arg in py_args if arg), + # Filter out empty strings at start of iterable + # (causes issues with python cli) + *(arg for i, arg in enumerate(py_args) if (arg or i > 0)), ] # Write files if any |