rename to_str to to_bytes
This commit is contained in:
1 parent
6bf8384c35
commit
9fa20f0e52
4 files changed
+12
-8
No files matched your search
@@ -22,7 +22,7 @@ from serial import SerialTimeoutException
|
||||
|
||||
from octoprint.settings import settings
|
||||
from octoprint.plugin import plugin_manager
|
||||
from octoprint.util import RepeatedTimer, to_str
|
||||
from octoprint.util import RepeatedTimer, to_bytes
|
||||
|
||||
class VirtualPrinter(object):
|
||||
command_regex = re.compile(r"^([GMTF])(\d+)")
|
||||
@@ -1345,7 +1345,7 @@ class VirtualPrinter(object):
|
||||
line = self.outgoing.get(timeout=timeout)
|
||||
self._seriallog.info(">>> {}".format(line.strip()))
|
||||
self.outgoing.task_done()
|
||||
return to_str(line)
|
||||
return to_bytes(line)
|
||||
except queue.Empty:
|
||||
# queue empty? return empty line
|
||||
return b""
|
||||
|
||||
Reference in new issue
Block a user