Skip to content

Add some defensive-coding checks#251

Open
ferdnyc wants to merge 3 commits intoozmartian:masterfrom
ferdnyc:fix-last-keyframe
Open

Add some defensive-coding checks#251
ferdnyc wants to merge 3 commits intoozmartian:masterfrom
ferdnyc:fix-last-keyframe

Conversation

@ferdnyc
Copy link
Copy Markdown
Contributor

@ferdnyc ferdnyc commented Oct 7, 2019

These changes deal with a variety of traceback exposures under certain circumstances that, in practice, occur fairly often:

  • Empty strings / None values on the inputs file path list
  • Not properly respecting formatted_time during the last_keyframe adjustment
  • Blank/short lines in the ffprobe CSV output that don't match the regexp used to parse them

The list `inputs` can apparently contain empty strings, which means:
- os.remove() will throw TypeError, not FileNotFoundError
- Other os.* functions will be flummoxed if passed NoneType arguments
@ferdnyc
Copy link
Copy Markdown
Contributor Author

ferdnyc commented Oct 7, 2019

Whoops, I see that @scrool's #183 also covered a bunch of these, and probably better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant