task_manager: assert stdout/stderr exist to make mypy happy
This commit is contained in:
@@ -53,6 +53,7 @@ class BaseTask(threading.Thread):
|
|||||||
# Check if stderr is ready to be read from
|
# Check if stderr is ready to be read from
|
||||||
rlist, _, _ = select.select([p.stderr, p.stdout], [], [], 0)
|
rlist, _, _ = select.select([p.stderr, p.stdout], [], [], 0)
|
||||||
if p.stderr in rlist:
|
if p.stderr in rlist:
|
||||||
|
assert p.stderr is not None
|
||||||
line = p.stderr.readline()
|
line = p.stderr.readline()
|
||||||
if line != "":
|
if line != "":
|
||||||
p_state.stderr.append(line.strip("\n"))
|
p_state.stderr.append(line.strip("\n"))
|
||||||
@@ -60,6 +61,7 @@ class BaseTask(threading.Thread):
|
|||||||
p_state.output.put(line)
|
p_state.output.put(line)
|
||||||
|
|
||||||
if p.stdout in rlist:
|
if p.stdout in rlist:
|
||||||
|
assert p.stdout is not None
|
||||||
line = p.stdout.readline()
|
line = p.stdout.readline()
|
||||||
if line != "":
|
if line != "":
|
||||||
p_state.stdout.append(line.strip("\n"))
|
p_state.stdout.append(line.strip("\n"))
|
||||||
|
|||||||
Reference in New Issue
Block a user