Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some defensive-coding checks #251

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ferdnyc
Copy link
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
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.

None yet

1 participant