← Back to team overview

sikuli-driver team mailing list archive

[Question #300594]: Exception handling error

 

New question #300594 on Sikuli:
https://answers.launchpad.net/sikuli/+question/300594

So I have the following script section:

def TryCreation():
    try:
        CreateLoop();
    except Exception:
        return false;
    popup("True: " + acc);
    return true;

def MainLoop():
    while True:
        if TryCreation():
            acc+=1;
        if !TryCreation():
            #closeWindows()
            acc-=2;

popup("Initialized...")
MainLoop()

-------------------------------

And upon executing, I receive the following error:

[error] script [ RSAccMake ] stopped with error in line 61
[error] NameError ( global name 'false' is not defined )
[error] --- Traceback --- error source first line: module ( function ) statement 48: main ( TryCreation ) return false;
54: main ( MainLoop ) if TryCreation():
[error] --- Traceback --- end --------------



Not sure how to fix it (excuse my ignorance to the topic). Thank you!

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