Fix logging for corrupt segments (#5582)

* Fix logging for corrupt segments

* Formatting
This commit is contained in:
Nicolas Mowen 2023-02-24 18:13:33 -07:00 committed by GitHub
parent 9621b4b9a1
commit d97fa99ec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,10 +171,12 @@ class RecordingMaintainer(threading.Thread):
else:
if duration == -1:
logger.warning(
f"Failed to probe corrupt segment {f}: {p.returncode} - {p.stderr}"
f"Failed to probe corrupt segment {cache_path}: {p.returncode} - {p.stderr}"
)
logger.warning(f"Discarding a corrupt recording segment: {f}")
logger.warning(
f"Discarding a corrupt recording segment: {cache_path}"
)
Path(cache_path).unlink(missing_ok=True)
continue