diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-27 21:42:43 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-27 21:42:43 -0400 |
commit | a96939b4e88302e13abc033355cbf21cb66bd3ac (patch) | |
tree | a0e1eb1aef8c3e1b8c623fe3e3a8a3aa52a76159 /cmd2/utils.py | |
parent | bbea550e5815435bcf52b7f1e017c34c56c54a87 (diff) | |
download | cmd2-git-a96939b4e88302e13abc033355cbf21cb66bd3ac.tar.gz |
Renamed stuff and removed unneeded KeyboardInterrupt protection
Diffstat (limited to 'cmd2/utils.py')
-rw-r--r-- | cmd2/utils.py | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py index 5bb08edd..4172e362 100644 --- a/cmd2/utils.py +++ b/cmd2/utils.py @@ -414,19 +414,14 @@ class ProcReader(object): def wait(self) -> None: """Wait for the process to finish""" - while True: - try: - if self._out_thread.is_alive(): - self._out_thread.join() - if self._err_thread.is_alive(): - self._err_thread.join() - - # Handle case where the process ended before the last read could be done. - # This will return None for the streams that weren't pipes. - out, err = self._proc.communicate() - break - except KeyboardInterrupt: - pass + if self._out_thread.is_alive(): + self._out_thread.join() + if self._err_thread.is_alive(): + self._err_thread.join() + + # Handle case where the process ended before the last read could be done. + # This will return None for the streams that weren't pipes. + out, err = self._proc.communicate() if out: self._write_bytes(self._stdout, out) |