← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #695712]: exit throws Exception

 

Question #695712 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/695712

    Status: Open => Answered

RaiMan proposed the following answer:
apparently it is not possible to exit() without exception from a try:
block

this works:

shouldExit = False
try:
    print "try"
    shouldExit = True
    #exit(1) --- this is not possible
except:
    print "except"

if shouldExit:
    print "shouldExit"    
    exit(1)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.