summaryrefslogtreecommitdiff
path: root/tools/process-motion-timecodes.py
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-06-07 20:40:23 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-06-07 20:40:23 +0300
commitc733639969a50c7db826593d2fc7f8e7899418e2 (patch)
treee02db7f6e1543e6a4a11303debd41561848fa222 /tools/process-motion-timecodes.py
parent62bd99516804b2e204f533de9346137aa9063131 (diff)
tools/process-motion-timecodes.py: don't proceed if no valid timecodes left after filtering
Diffstat (limited to 'tools/process-motion-timecodes.py')
-rwxr-xr-xtools/process-motion-timecodes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/process-motion-timecodes.py b/tools/process-motion-timecodes.py
index 70c990d..ba4ee26 100755
--- a/tools/process-motion-timecodes.py
+++ b/tools/process-motion-timecodes.py
@@ -48,6 +48,8 @@ if __name__ == '__main__':
# sort out invalid fragments (dvr-scan returns them sometimes, idk why...)
timecodes = list(filter(lambda f: f[0] < f[1], timecodes))
+ if not timecodes:
+ raise ValueError('no valid timecodes')
file_dt = filename_to_datetime(arg.source_filename)