Skip to content

Commit

Permalink
Avoid accessing non-existing attributes (fix #139)
Browse files Browse the repository at this point in the history
  • Loading branch information
boppreh committed Mar 29, 2018
1 parent 9a462d2 commit 5eb37d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions keyboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ def unhook_all():
Removes all keyboard hooks in use, including hotkeys, abbreviations, word
listeners, `record`ers and `wait`s.
"""
_listener.start_if_necessary()
_listener.blocking_keys.clear()
_listener.nonblocking_keys.clear()
del _listener.blocking_hooks[:]
Expand Down

0 comments on commit 5eb37d4

Please sign in to comment.