Skip to content

Commit

Permalink
Merge branch 'kliment:master' into PythonSupport3.12_3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
DivingDuck authored Jan 31, 2025
2 parents 5b886fc + ef774a9 commit 2ca468d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion printrun/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def _write_serial(self, data):
try:
self._device.write(data)
except serial.SerialException as e:
msg = "Unable to write to serial port '{self.port}'"
msg = f"Unable to write to serial port '{self.port}'"
raise DeviceError(msg, e) from e

def _disable_ttyhup(self):
Expand Down
4 changes: 2 additions & 2 deletions printrun/printcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __init__(self, port = None, baud = None, dtr=None):
def addEventHandler(self, handler):
'''
Adds an event handler.
@param handler: The handler to be added.
'''
self.event_handler.append(handler)
Expand Down Expand Up @@ -707,5 +707,5 @@ def _send(self, command, lineno = 0, calcchecksum = False):
self.writefailures = 0
except device.DeviceError as e:
self.logError("Can't write to printer (disconnected?)"
"{0}".format(e))
" {0}".format(e))
self.writefailures += 1

0 comments on commit 2ca468d

Please sign in to comment.