def module(self): if not hasattr(self, '_module'): module = None try: module = import_system_file(self.file_name, False) except ImportError: self.logger.error('Failed to import module %s. Skipping.', self.file_name, exc_info=True) self.logger.debug('Full python path:\n%s', '\n'.join(sys.path)) except Exception: self.logger.critical('Failed to import module %s. Skipping.', self.file_name, exc_info=True) self._module = module return self._module