Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Fix exception when device can not be accessed (caused by logging)
Browse files Browse the repository at this point in the history
  • Loading branch information
lebaston100 committed Apr 10, 2020
1 parent 6c0e938 commit ae6de7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, device, deviceid):
self.log.debug("Attempting to open midi port `%s`" % self._devicename)
self._port = mido.open_input(name=self._devicename, callback=self.callback)
except:
self.log.critical("\nCould not open", self._devicename)
self.log.critical("\nCould not open device `%s`" % self._devicename)
self.log.critical("The midi device might be used by another application/not plugged in/have a different name.")
self.log.critical("Please close the device in the other application/plug it in/select the rename option in the device management menu and restart this script.\n")
# EIO 5 (Input/output error)
Expand Down

0 comments on commit ae6de7f

Please sign in to comment.