Skip to content

Commit

Permalink
fixed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
4gra committed Jan 29, 2022
1 parent 08d95f2 commit a01e4d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launchpad_py/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ def __init__(self, reset_on_close=False, emulate=False):
def __enter__(self):
self.lp = None
if self.always_emulate is True:
self.lp = LaunchpadEmu()
self.lp = launchpad.emu.LaunchpadEmu()
else:
try:
self.lp = launchpad.Launchpad()
self.lp.Open()
self.lp.ButtonFlush()
except:
if self.always_emulate is not False:
self.lp = launchpad.LaunchpadEmu()
self.lp = launchpad.emu.LaunchpadEmu()
return self.lp

def __exit__(self, type, value, traceback):
Expand Down

0 comments on commit a01e4d2

Please sign in to comment.