mirror of https://github.com/Desuuuu/klipper.git
gcode: Fix Python3 syntax error
Fix error introduced in d6c3aaad
. Also, go back to only accepting
ascii characters on input.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
dd98884bb4
commit
d23c1b06c6
|
@ -381,8 +381,8 @@ class GCodeIO:
|
|||
def _process_data(self, eventtime):
|
||||
# Read input, separate by newline, and add to pending_commands
|
||||
try:
|
||||
data = str(os.read(self.fd, 4096).decode('utf8'))
|
||||
except os.error, UnicodeDecodeError:
|
||||
data = str(os.read(self.fd, 4096).decode())
|
||||
except (os.error, UnicodeDecodeError):
|
||||
logging.exception("Read g-code")
|
||||
return
|
||||
self.input_log.append((eventtime, data))
|
||||
|
|
Loading…
Reference in New Issue