@@ -236,20 +236,17 @@ def main():
236
236
237
237
# ==========================================================================
238
238
# iterate over all of the created submissions, checking to see if they are empty
239
- # and adding a message to the top if so (to differentiate empty files from errors in the UI)
240
-
241
- no_files_match_error = "ERROR! No files matched provided regex in selected directories"
239
+ # and printing a message if so
242
240
243
241
for user in os .listdir (os .path .join (args .basepath , "users" )):
244
242
user_path = os .path .join (args .basepath , "users" , user )
245
243
for version in os .listdir (user_path ):
246
244
version_path = os .path .join (user_path , version )
247
245
my_concatenated_file = os .path .join (version_path , "submission.concatenated" )
248
- with open (my_concatenated_file , "r+ " ) as my_cf :
246
+ with open (my_concatenated_file , "r" ) as my_cf :
249
247
if my_cf .read () == "" :
250
- my_cf .write (no_files_match_error )
251
- total_concat += sys .getsizeof (no_files_match_error )
252
- checkTotalSize (total_concat )
248
+ print ("Warning: No files matched provided regex in selected directories "
249
+ f"for user { user } version { version } " )
253
250
254
251
# do the same for the other gradeables
255
252
for other_gradeable in prior_term_gradeables :
@@ -261,11 +258,10 @@ def main():
261
258
for other_version in os .listdir (other_user_path ):
262
259
other_version_path = os .path .join (other_user_path , other_version )
263
260
my_concatenated_file = os .path .join (other_version_path , "submission.concatenated" )
264
- with open (my_concatenated_file , "r+ " ) as my_cf :
261
+ with open (my_concatenated_file , "r" ) as my_cf :
265
262
if my_cf .read () == "" :
266
- my_cf .write (no_files_match_error )
267
- total_concat += sys .getsizeof (no_files_match_error )
268
- checkTotalSize (total_concat )
263
+ print ("Warning: No files matched provided regex in selected directories "
264
+ f"for user { other_user } version { other_version } " )
269
265
270
266
# ==========================================================================
271
267
# concatenate provided code
0 commit comments