added traceback

main
ostrichb 3 years ago
parent 6e5d9d1bd8
commit a8e329f4cf

@ -53,15 +53,15 @@ if __name__ == '__main__':
],
title="Setting the API",
form_height=5)
if choice0 == "cancel":
break
if choice0 == d.CANCEL:
exit(2)
(choice1, routine_mode) = d.menu("Choose the routine mode listed below.",
width=54,
choices=[("Fixed", "Fixed interval between each routine."),
("Ranged", "Randomly picks an interval in a range.")],
title="Routine Mode")
if choice1 == "cancel":
break
if choice1 == d.CANCEL:
exit(2)
else:
if routine_mode == "Fixed":
(choice2, interval) = d.inputbox("Enter the interval during each routine, in seconds",
@ -88,7 +88,7 @@ if __name__ == '__main__':
for item in interval:
item = int(item)
if choice2 == "cancel":
break
exit(2)
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, "
"from Monday to Friday.",
@ -99,7 +99,7 @@ if __name__ == '__main__':
else parsed_arguments.temp_file_threshold),
title="Temporary file threshold")
if choice4 == "Cancel":
break
exit(2)
# Conclusion
if d.yesno("You've selected:\n"
"Client ID: {0}\n"

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

Loading…
Cancel
Save