Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in the messages shown when serial connection fails #1478

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading