xx
Browse files- src/submission/submit.py +3 -3
src/submission/submit.py
CHANGED
@@ -107,11 +107,11 @@ def add_new_eval(
|
|
107 |
downloads = 0
|
108 |
|
109 |
# Seems good, creating the eval
|
110 |
-
print("Adding new eval")
|
111 |
max_size = 5 * 1024 * 1024 # 5MB
|
112 |
-
if os.path.getsize(runsh.name) > max_size:
|
113 |
return "错误:文件大小不能超过 5MB!"
|
114 |
-
if os.path.getsize(adapter.name) > max_size:
|
115 |
return "错误:文件大小不能超过 5MB!"
|
116 |
|
117 |
with open(runsh.name, "r") as f:
|
|
|
107 |
downloads = 0
|
108 |
|
109 |
# Seems good, creating the eval
|
110 |
+
print("Adding new eval", runsh)
|
111 |
max_size = 5 * 1024 * 1024 # 5MB
|
112 |
+
if runsh is not None and os.path.getsize(runsh.name) > max_size:
|
113 |
return "错误:文件大小不能超过 5MB!"
|
114 |
+
if adapter is not None and os.path.getsize(adapter.name) > max_size:
|
115 |
return "错误:文件大小不能超过 5MB!"
|
116 |
|
117 |
with open(runsh.name, "r") as f:
|