We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df9784a commit 8b39663Copy full SHA for 8b39663
1 file changed
taskbadger/process.py
@@ -34,6 +34,9 @@ def run(self):
34
else:
35
yield
36
37
+ if self.capture_output and (stdout or stderr):
38
+ yield {"stdout": stdout.read(), "stderr": stderr.read()}
39
+
40
self.returncode = process.returncode
41
42
@@ -67,6 +70,9 @@ def read(self):
67
70
self._lock.release()
68
71
return outdata
69
72
73
+ def __bool__(self):
74
+ return bool(self.data)
75
76
77
def _should_update(last_update: datetime, update_frequency_seconds):
78
return (datetime.utcnow() - last_update).total_seconds() >= update_frequency_seconds
0 commit comments