mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 18:36:09 +01:00 
			
		
		
		
	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:
		| @@ -381,8 +381,8 @@ class GCodeIO: | |||||||
|     def _process_data(self, eventtime): |     def _process_data(self, eventtime): | ||||||
|         # Read input, separate by newline, and add to pending_commands |         # Read input, separate by newline, and add to pending_commands | ||||||
|         try: |         try: | ||||||
|             data = str(os.read(self.fd, 4096).decode('utf8')) |             data = str(os.read(self.fd, 4096).decode()) | ||||||
|         except os.error, UnicodeDecodeError: |         except (os.error, UnicodeDecodeError): | ||||||
|             logging.exception("Read g-code") |             logging.exception("Read g-code") | ||||||
|             return |             return | ||||||
|         self.input_log.append((eventtime, data)) |         self.input_log.append((eventtime, data)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user