Skip to content

Commit

Permalink
Revert import changes to fix #133
Browse files Browse the repository at this point in the history
  • Loading branch information
boppreh committed Mar 26, 2018
1 parent 14cd6f5 commit 338b245
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions keyboard/__init__.py
Expand Up @@ -116,15 +116,14 @@ def wait(self):
break

import platform as _platform
import importlib as _importlib
_os_keyboard = _importlib.import_module(
{
'Windows': '._winkeyboard',
'Linux': '._nixkeyboard',
'Darwin': '._darwinkeyboard',
}[_platform.system()],
__package__
) # 100% coverage or bust.
if _platform.system() == 'Windows':
from. import _winkeyboard as _os_keyboard
elif _platform.system() == 'Linux':
from. import _nixkeyboard as _os_keyboard
elif _platform.system() == 'Darwin':
from. import _darwinkeyboard as _os_keyboard
else:
raise OSError("Unsupported platform '{}'".format(_platform.system()))

from ._keyboard_event import KEY_DOWN, KEY_UP, KeyboardEvent, normalize_name as _normalize_name
from ._generic import GenericListener as _GenericListener
Expand Down

0 comments on commit 338b245

Please sign in to comment.