SHARE
TWEET
Untitled
a guest
Jan 10th, 2011
22
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ###... The rest of boot.py here
- ###
- try:
- from robot import run
- print("Running user code.")
- run()
- except: #Would need to do some fancy stuff here to not catch RuntimeError with "Restart", or a custom exception class for restarts?
- print("Unhandled exception caught.")
- #Some sort of info from traceback to print the exception information?
- print("Press your restart button to continue.")
- from robot import CheckRestart
- while True:
- #This is a bit odd because we have to do something when CheckRestart throws an exception...
- try:
- CheckRestart()
- except RuntimeError: #Make sure that it's "Restart"
- break
- finally:
- rollback.uninstall()
RAW Paste Data
