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

Fix unnamed append points #11

Merged
merged 1 commit into from
Jun 3, 2014
Merged

Fix unnamed append points #11

merged 1 commit into from
Jun 3, 2014

Conversation

runiq
Copy link

@runiq runiq commented Jun 3, 2014

In ConfigFile.compile(), the variable content is used but not
initialized, which results in unnamed append points being deleted and
insert_lines being appended at the end instead. Due to the
undifferentiated try/except block around this, the error is silently
ignored.

This fix makes the try/except block only handle ValueError, which
would occur when there's no explicit append point.

In `ConfigFile.compile()`, the variable `content` is used but not
initialized, which results in unnamed append points being deleted and
`insert_lines` being appended at the end instead. Due to the
undifferentiated `try/except` block around this, the error is silently
ignored.

This fix makes the `try/except` block only handle `ValueError`, which
would occur when there's no explicit append point.
evanpurkhiser added a commit that referenced this pull request Jun 3, 2014
@evanpurkhiser evanpurkhiser merged commit 4f7b6ae into evanpurkhiser:master Jun 3, 2014
@evanpurkhiser
Copy link
Owner

Good catch, thank you!

@runiq runiq deleted the fix-unnamed-append-points branch June 4, 2014 06:02
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

2 participants