aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--snekbox/nsjail.py5
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