2008-11-19, 21:43
I'm currently writing a Python script and I tried to add some exception handling but XBMC seems to crash when I do something like this:
The odd thing is that it doesn't happen when I directly call sys.exit(). I'd rather use a "goto label" to jump to the end of script but the label/goto libs don't seem to be available on XBMC. Anyway knows how to fix this?
Please note that I'm still sort of a novice concerning Python coding.
Code:
for tries in range(5):
try:
....
except:
if tries==5:
sys.exit(1)
The odd thing is that it doesn't happen when I directly call sys.exit(). I'd rather use a "goto label" to jump to the end of script but the label/goto libs don't seem to be available on XBMC. Anyway knows how to fix this?
Please note that I'm still sort of a novice concerning Python coding.