summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.py b/main.py
index ecd2b75..30ec645 100644
--- a/main.py
+++ b/main.py
@@ -24,8 +24,10 @@ def get_programs(path: str, names: str, do_canonicalize: bool = False):
for submission in os.listdir(user_dir):
with open(os.path.join(user_dir, submission), 'r') as f:
- code = f.read().strip()
-
+ try:
+ code = f.read().strip()
+ except:
+ continue
# skip syntactically incorrect programs
try:
ast.parse(code)