From ae6de7f1018c50d0170aacd06baa7b9bc65f0292 Mon Sep 17 00:00:00 2001 From: lebaston100 <26111114+lebaston100@users.noreply.github.com> Date: Fri, 10 Apr 2020 18:22:16 +0200 Subject: [PATCH] Fix exception when device can not be accessed (caused by logging) --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 01ff006..77ae4c8 100644 --- a/main.py +++ b/main.py @@ -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)