diff --git a/volta/core/core.py b/volta/core/core.py index 6e1c8b0..0e2f7f8 100644 --- a/volta/core/core.py +++ b/volta/core/core.py @@ -270,8 +270,12 @@ def end_test(self): logger.info('Finishing test...') if 'volta' in self.enabled_modules: self.volta.end_test() - self.process_currents.close() - self.process_currents.join() + try: + self.process_currents.close() + except AttributeError: + logger.warn('Core has no process currents thread. Seems like VoltaBox initialization failed') + else: + self.process_currents.join() if 'phone' in self.enabled_modules: self.phone.end() if self.events_parser: diff --git a/volta/providers/boxes/box_binary.py b/volta/providers/boxes/box_binary.py index b658b1f..d115d52 100644 --- a/volta/providers/boxes/box_binary.py +++ b/volta/providers/boxes/box_binary.py @@ -106,8 +106,12 @@ def end_test(self): except AttributeError: logger.warn('VoltaBox has no Reader. Seems like VoltaBox initialization failed') logger.debug('VoltaBox has no Reader. Seems like VoltaBox initialization failed', exc_info=True) - self.pipeline.close() - self.pipeline.join(10) + try: + self.pipeline.close() + except AttributeError: + logger.warn('VoltaBox has no Pipeline. Seems like VoltaBox initialization failed') + else: + self.pipeline.join(10) self.data_source.close() def get_info(self): @@ -156,6 +160,7 @@ def start_test(self, results): self.pipeline.start() logger.debug('Waiting grabber thread finish...') + class BoxBinaryReader(object): """ Read chunks from source, convert and return numpy.array