Don't try to wait for StreamCapturer that was never started

This commit is contained in:
Thomas Kluyver 2013-10-21 17:37:34 -07:00
parent 7d98362972
commit 4bcd7bd44d

View File

@ -31,7 +31,6 @@ import glob
from io import BytesIO from io import BytesIO
import os import os
import os.path as path import os.path as path
import re
from select import select from select import select
import sys import sys
from threading import Thread, Lock, Event from threading import Thread, Lock, Event
@ -436,6 +435,7 @@ class SubprocessStreamCapturePlugin(Plugin):
formatError = formatFailure formatError = formatFailure
def finalize(self, result): def finalize(self, result):
if self.stream_capturer.started:
self.stream_capturer.stop.set() self.stream_capturer.stop.set()
self.stream_capturer.join() self.stream_capturer.join()