Fix missing sys import and stale clips.txt accumulation#8
Open
patrickrconnor wants to merge 1 commit into
Open
Fix missing sys import and stale clips.txt accumulation#8patrickrconnor wants to merge 1 commit into
patrickrconnor wants to merge 1 commit into
Conversation
- Add `import sys` so the `sys.exit` calls in spliceFilm (disk-space guard) and prompt_name (cancel path) don't NameError when triggered. - Change `>>` to `>` in splice.sh so a leftover clips.txt in the repo root from a prior crashed run doesn't accumulate into the next ffmpeg concat list. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CalNightingale
approved these changes
May 9, 2026
CalNightingale
left a comment
Owner
There was a problem hiding this comment.
LGTM - thanks patty for the improvements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small bug fixes for latent failure modes in the splice pipeline:
import systosplice.py.sys.exit(...)is called in two places — the disk-space guard inspliceFilm(splice.py:203) and the cancel path inprompt_name(splice.py:347) — butsyswas never imported, so either path wouldNameErrorinstead of exiting cleanly.>>to>insplice.sh. The clip-list build appended toclips.txtin the repo root beforemv-ing it intostaging/. If a previous run died between the redirect and themv(Ctrl-C, ffmpeg crash, etc.), the stale file in the repo root would accumulate entries on the next run, producing a malformed concat manifest. Truncating with>makes each run start clean.No behavior change on the happy path.
Test plan
new spliceend-to-end and confirm splice + upload still work.NameError.clips.txtin the repo root, run a splice, confirm the resultingstaging/clips.txtonly contains the current run's entries.