handle stderr

This commit is contained in:
iddoeldor 2018-07-31 13:15:19 +03:00 committed by GitHub
parent cd8a028867
commit 87944ff808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,9 @@ class Shell(object):
def _on_output(self, pid, fd, data):
# if len(data) > 0:
# print("⚡ output: pid={}, fd={}, data={}".format(pid, fd, repr(data)))
# fd=0 (input) fd=1(stdout) fd=2(stderr)
# TODO handle fd=2
if fd != 2:
self.output.append(data)
def _on_detached(self, pid, session, reason):