summaryrefslogtreecommitdiff
path: root/cmd2/utils.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-03-27 21:42:43 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-03-27 21:42:43 -0400
commita96939b4e88302e13abc033355cbf21cb66bd3ac (patch)
treea0e1eb1aef8c3e1b8c623fe3e3a8a3aa52a76159 /cmd2/utils.py
parentbbea550e5815435bcf52b7f1e017c34c56c54a87 (diff)
downloadcmd2-git-a96939b4e88302e13abc033355cbf21cb66bd3ac.tar.gz
Renamed stuff and removed unneeded KeyboardInterrupt protection
Diffstat (limited to 'cmd2/utils.py')
-rw-r--r--cmd2/utils.py21
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)