sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11522
Re: [Question #202307]: How to create function and skip it if it fails
Question #202307 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/202307
Status: Open => Answered
RaiMan proposed the following answer:
def myFunction():
print ("I may fail")
if (some_condition):
print ("success")
return True
else:
print ("fail")
return False
if myFunction():
# will bes skipped if failed (myFunction returns False)
# success do something
# start of next step
see faq 1800 on indentation
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.