Skip to content
Extraits de code Groupes Projets
Valider b8305c96 rédigé par Charles-Henry Bertrand Van Ouytsel's avatar Charles-Henry Bertrand Van Ouytsel
Parcourir les fichiers

Add script V1

parent ca9f2e64
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
import csv
import sys
if __name__ == "__main__":
modified_lines = sys.argv[1]
author = sys.argv[2]
modifs = modified_lines.split('\n')
if len(modifs) != 2:
print("You modify wrong number of lines !")
exit(1)
if author not in modifs[0] and (author not in modifs[1]) :
print("You modify the line of another student !\n")
exit(1)
curr_line = modifs[1].split(',')
if len(curr_line) != 4:
print('You broke file format by suppressing/adding "," !\n')
exit(1)
prev_line = modifs[1].split(',')
modifs[0][0]=' '
modifs[0][1]=' '
for i in range(modifs[0]):
if i<3 and prev_line[i] != curr_line[i] :
print('You modify your data !\n')
exit(1)
if(curr_line[4]) !='VU' or (curr_line[4]) !=' VU' or (curr_line[4]) !='VU ':
print('You have to write "VU" in the last column !\n')
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter