Skip to content

Commit

Permalink
Pylint: fix parser warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenbe committed May 24, 2024
1 parent 8553f3a commit 65a2ece
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comfospot40/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def read_byte(self, retries=5):
try:
return await self._ser.read(1)
except SerialException as e:
logging.warning("Failed to read serial: {}".format(e))
logging.warning("Failed to read serial: %s", e)
if retries > 0:
await asyncio.sleep(0.1 * retries)
retries -= 1
Expand All @@ -50,7 +50,7 @@ async def search_length(self, data):
z = Packet(data)
pdata = [hex(d) for d in data]
if self._packetlog:
with open(self._packetlog, "a") as logfile:
with open(self._packetlog, "a", encoding="utf-8") as logfile:
logfile.write(
datetime.now().strftime("%H:%M:%S.%f") + " " + str(z) + "\n"
)
Expand Down

0 comments on commit 65a2ece

Please sign in to comment.