8000 bpo-40585: Normalize errors messages in codeop when comparing them by pablogsal · Pull Request #20030 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40585: Normalize errors messages in codeop when comparing them #20030

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

Merged
merged 4 commits into from
May 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
DE49
Diff view
Diff view
Prev Previous commit
fixup! fixup! fixup! bpo-40585: Normalize errors messages in codeop w…
…hen comparing them
  • Loading branch information
pablogsal committed May 11, 2020
commit 97d320a9d8927d9a1d6070f66951336c1c9e0058
6 changes: 4 additions & 2 deletions Parser/pegen/pegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,10 @@ get_error_line(char *buffer, int is_file)
newline = strchr(buffer, '\n');
}

while (is_file && newline > buffer && newline[-1] == '\n') {
--newline;
if (is_file) {
while (newline > buffer && newline[-1] == '\n') {
--newline;
}
}

if (newline) {
Expand Down
0