diff options
-rw-r--r-- | main.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |