Browse Source

improve comments, remove unneeded closes...

main
John-Mark Gurney 3 years ago
parent
commit
cc86e21674
1 changed files with 3 additions and 6 deletions
  1. +3
    -6
      bitelab/__main__.py

+ 3
- 6
bitelab/__main__.py View File

@@ -318,8 +318,8 @@ class TestExecClient(unittest.IsolatedAsyncioTestCase):
stdin_task = loop.run_in_executor(None, self.copytask, stdin_task = loop.run_in_executor(None, self.copytask,
io.BytesIO(stdin), stdinwriter) io.BytesIO(stdin), stdinwriter)


# do not close stdout, otherwise we cannot obtain
# the value
# do not close stdout, otherwise we cannot call
# getvalue on BytesIO object
stdout_task = loop.run_in_executor(None, self.copytask, stdout_task = loop.run_in_executor(None, self.copytask,
stdoutreader, stdout, False) stdoutreader, stdout, False)


@@ -335,11 +335,8 @@ class TestExecClient(unittest.IsolatedAsyncioTestCase):
except SystemExit as e: except SystemExit as e:
ret = e.code ret = e.code


# No one to read anything anymore
stdinwriter.close()
stdinreader.close()

# No one to write anything anymore # No one to write anything anymore
# close so stdout_task will end
stdoutwriter.close() stdoutwriter.close()


# make sure all the data has been copied # make sure all the data has been copied


Loading…
Cancel
Save