diff --git a/application.py b/application.py index 6fa2281..50f9f2b 100755 --- a/application.py +++ b/application.py @@ -734,8 +734,13 @@ class Application(object): def run_pipe(self, args, b, name='*Output*', switch=True, modename=None): pipe = Popen(args=args, stdin=PIPE, stdout=PIPE, stderr=STDOUT) data = b.make_string().encode('utf-8') - pipe.stdin.write(data) - pipe.stdin.close() + try: + pipe.stdin.write(data) + pipe.stdin.close() + except IOError: + # sometimes the program will stop reading from stdin before we're + # done. this is fine and we should ignore the IOError. + pass output = pipe.stdout.read() status = pipe.wait() if callable(switch):