On quitte un programme avec sys.exit
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
4c241eeb60
commit
ca69954315
3
main.py
3
main.py
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from random import choice
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -107,7 +108,7 @@ def stop(exit_code: int = 0):
|
|||
Stoppe le programme avec le code d'erreur donné.
|
||||
"""
|
||||
print("Fin du programme, merci !")
|
||||
exit(exit_code)
|
||||
sys.exit(exit_code)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue