← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #202942]: exit() inside try/except

 

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

    Status: Open => Answered

Roman Podolyan proposed the following answer:
Here is working code:

====
import sys

try:
	hover("1342096962957.png")
	popup('Ok!')
	sys.exit()
except FindFailed:
	pass

popup('There was no exit!')
====


You should import sys module and call exit function right.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.