diff --git a/turbinia/evidence.py b/turbinia/evidence.py index a52d2f557..fbe605c9f 100644 --- a/turbinia/evidence.py +++ b/turbinia/evidence.py @@ -1070,6 +1070,8 @@ def _validate(self): log.info(f'Running pinfo.py to validate PlasoFile {self.local_path}') command = subprocess.run(cmd, capture_output=True, check=True) storage_counters_json = command.stdout.decode('utf-8').strip() + # pinfo.py might print warnings (non-json) so we only need to last line of output + storage_counters_json = storage_counters_json.splitlines()[-1] storage_counters = json.loads(storage_counters_json) total_file_events = storage_counters.get('storage_counters', {}).get( 'parsers', {}).get('total', 0)