Add error message for duplicate stream recordings (#75654)
This commit is contained in:
parent
5c234a3504
commit
b71e3397fd
1 changed files with 7 additions and 1 deletions
|
@ -163,4 +163,10 @@ class RecorderOutput(StreamOutput):
|
||||||
_LOGGER.error("Recording failed to capture anything")
|
_LOGGER.error("Recording failed to capture anything")
|
||||||
else:
|
else:
|
||||||
output.close()
|
output.close()
|
||||||
|
try:
|
||||||
os.rename(self.video_path + ".tmp", self.video_path)
|
os.rename(self.video_path + ".tmp", self.video_path)
|
||||||
|
except FileNotFoundError:
|
||||||
|
_LOGGER.error(
|
||||||
|
"Error writing to '%s'. There are likely multiple recordings writing to the same file",
|
||||||
|
self.video_path,
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue