Commit 99bdb72
Add encoding validation in parse_file() and fix write_file parameter bug
- Validate the encoding parameter before attempting to open the file.
This provides a clearer error message when an invalid encoding is
specified, rather than letting the error propagate from the open() call.
- Fix bug from PR #489 where write_file() referenced undefined variables
(parse_stack/append_middleware) instead of the renamed parameters
(unparse_stack/prepend_middleware).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 59a3c34 commit 99bdb72
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
128 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
| |||
0 commit comments