added traceback

main
ostrichb 3 years ago
parent 6e5d9d1bd8
commit a8e329f4cf

@ -53,15 +53,15 @@ if __name__ == '__main__':
], ],
title="Setting the API", title="Setting the API",
form_height=5) form_height=5)
if choice0 == "cancel": if choice0 == d.CANCEL:
break exit(2)
(choice1, routine_mode) = d.menu("Choose the routine mode listed below.", (choice1, routine_mode) = d.menu("Choose the routine mode listed below.",
width=54, width=54,
choices=[("Fixed", "Fixed interval between each routine."), choices=[("Fixed", "Fixed interval between each routine."),
("Ranged", "Randomly picks an interval in a range.")], ("Ranged", "Randomly picks an interval in a range.")],
title="Routine Mode") title="Routine Mode")
if choice1 == "cancel": if choice1 == d.CANCEL:
break exit(2)
else: else:
if routine_mode == "Fixed": if routine_mode == "Fixed":
(choice2, interval) = d.inputbox("Enter the interval during each routine, in seconds", (choice2, interval) = d.inputbox("Enter the interval during each routine, in seconds",
@ -88,7 +88,7 @@ if __name__ == '__main__':
for item in interval: for item in interval:
item = int(item) item = int(item)
if choice2 == "cancel": if choice2 == "cancel":
break exit(2)
business_hour = True if d.yesno("Do you wanna enable business hours mode?\n" business_hour = True if d.yesno("Do you wanna enable business hours mode?\n"
"If you enabled this, the API will be only called from 9 to 5, " "If you enabled this, the API will be only called from 9 to 5, "
"from Monday to Friday.", "from Monday to Friday.",
@ -99,7 +99,7 @@ if __name__ == '__main__':
else parsed_arguments.temp_file_threshold), else parsed_arguments.temp_file_threshold),
title="Temporary file threshold") title="Temporary file threshold")
if choice4 == "Cancel": if choice4 == "Cancel":
break exit(2)
# Conclusion # Conclusion
if d.yesno("You've selected:\n" if d.yesno("You've selected:\n"
"Client ID: {0}\n" "Client ID: {0}\n"

@ -6,6 +6,7 @@ import pathlib
import random import random
import pause import pause
import readline import readline
import traceback
import datetime as dt import datetime as dt
from O365 import drive as d from O365 import drive as d
from O365 import mailbox as mb from O365 import mailbox as mb
@ -124,6 +125,7 @@ class O365_User:
if is_interactive: if is_interactive:
dlg.gauge_stop() dlg.gauge_stop()
logging.error(e) logging.error(e)
logging.error(traceback.format_exc())
logging.error("AN error occurred, the circulation will be jumped " logging.error("AN error occurred, the circulation will be jumped "
"to the end and wait for the next turn.") "to the end and wait for the next turn.")

Loading…
Cancel
Save