[elbe-devel] [PATCH v2 48/66] log: Fix Pylint
Olivier Dion
dion at linutronix.de
Fri Jun 5 19:07:12 CEST 2020
87:21: W0212: (protected-access)
219:0: R0205: (useless-object-inheritance)
266:8: C0200: (consider-using-enumerate)
Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/log.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/elbepack/log.py b/elbepack/log.py
index f17df9e7..6556733c 100644
--- a/elbepack/log.py
+++ b/elbepack/log.py
@@ -84,6 +84,8 @@ class ThreadFilter(logging.Filter):
def filter(self, record):
if hasattr(record, '_thread'):
+ # Hack to fake logging for another thread
+ # pylint: disable=protected-access
thread = record._thread
else:
thread = record.thread
@@ -215,7 +217,8 @@ def close_logging():
root.removeHandler(h)
local.handlers = []
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
class AsyncLogging(object):
def __init__(self, atmost, stream, block):
@@ -263,6 +266,7 @@ class AsyncLogging(object):
buff = rest + os.read(self.fd, self.atmost)
j = 0
count = 0
+ # pylint: disable=consider-using-enumerate
for i in range(len(buff)):
if buff[i] == '\n':
self.lines.append(buff[j:i])
--
2.27.0
More information about the elbe-devel
mailing list