fix pylint warnings

This commit is contained in:
Mike Kinney
2021-12-06 23:01:34 -08:00
parent b7c155e710
commit 6d2a187d38
7 changed files with 26 additions and 17 deletions

View File

@@ -1,16 +1,14 @@
""" Stream Interface base class
"""
import logging
import threading
import time
import traceback
import serial
import timeago
from tabulate import tabulate
from .mesh_interface import MeshInterface
from .util import stripnl
from .__init__ import LOCAL_ADDR, BROADCAST_NUM
START1 = 0x94
@@ -87,9 +85,9 @@ class StreamInterface(MeshInterface):
self.stream.write(b)
self.stream.flush()
def _readBytes(self, len):
def _readBytes(self, length):
"""Read an array of bytes from our stream"""
return self.stream.read(len)
return self.stream.read(length)
def _sendToRadioImpl(self, toRadio):
"""Send a ToRadio protobuf to the device"""
@@ -129,7 +127,7 @@ class StreamInterface(MeshInterface):
if ptr == 0: # looking for START1
if c != START1:
self._rxBuf = empty # failed to find start
if self.debugOut != None:
if self.debugOut is not None:
try:
self.debugOut.write(b.decode("utf-8"))
except: