sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49972
[Bug 1810640] [NEW] HotKey Events called even after exit and error
Public bug reported:
HotKey events are called efen if the script raises an error or exits.
example:
def F10(event):
print "F10"
def F11(event):
print "F11"
def F12(event):
print "F12"
def PGUP(event):
print "PGUP"
Env.addHotkey(Key.F10, KeyModifier.CTRL, F10)
Env.addHotkey(Key.F11, KeyModifier.CTRL, F11)
Env.addHotkey(Key.F12, KeyModifier.CTRL, F12)
Env.addHotkey(Key.PAGE_UP, KeyModifier.CTRL, PGUP)
a=1/0
exit()
Results:
[error] script [ test ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\temp\SikuliX\test.sikuli\test.py", line 17, in <module> a=1/0 ZeroDivisionError: integer division or modulo by zero
F10
F11
F12
PGUP
You can see, the functions are called even after the division by zero.
Fun Fact: In case i now change the function, for instance:
change UP to DOWN: Env.addHotkey(Key.PAGE_DOWN, KeyModifier.CTRL, PGUP)
actually I did not add it! Only alter the 4 characters.
Both keys are now reacting, having only one of them in the code.
Restart the IDE make the keys go away. (and of course unassignment - however that's not possible in case of errors)
** Affects: sikuli
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1810640
Title:
HotKey Events called even after exit and error
Status in Sikuli:
New
Bug description:
HotKey events are called efen if the script raises an error or exits.
example:
def F10(event):
print "F10"
def F11(event):
print "F11"
def F12(event):
print "F12"
def PGUP(event):
print "PGUP"
Env.addHotkey(Key.F10, KeyModifier.CTRL, F10)
Env.addHotkey(Key.F11, KeyModifier.CTRL, F11)
Env.addHotkey(Key.F12, KeyModifier.CTRL, F12)
Env.addHotkey(Key.PAGE_UP, KeyModifier.CTRL, PGUP)
a=1/0
exit()
Results:
[error] script [ test ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\temp\SikuliX\test.sikuli\test.py", line 17, in <module> a=1/0 ZeroDivisionError: integer division or modulo by zero
F10
F11
F12
PGUP
You can see, the functions are called even after the division by zero.
Fun Fact: In case i now change the function, for instance:
change UP to DOWN: Env.addHotkey(Key.PAGE_DOWN, KeyModifier.CTRL, PGUP)
actually I did not add it! Only alter the 4 characters.
Both keys are now reacting, having only one of them in the code.
Restart the IDE make the keys go away. (and of course unassignment - however that's not possible in case of errors)
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1810640/+subscriptions
Follow ups