statistics: Improve Python3 compatibility

Reported by @vladimir-poleh .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-12-15 11:27:08 -05:00
parent 0f3d68613d
commit 62cfc2527f
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class PrinterSysStats:
self.last_mem_avail = 0
self.mem_file = None
try:
self.mem_file = open("/proc/meminfo", "rb")
self.mem_file = open("/proc/meminfo", "r")
except:
pass
printer.register_event_handler("klippy:disconnect", self._disconnect)