Slice the output starting with the index for "{" before parsing it as JSON #632
No reviewers
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#632
Loading…
Reference in New Issue
No description provided.
Delete Branch "(deleted):json-parsing-error-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The output for some reason now contains "Acquiring lock with timeout" which throws an exception when parsed as JSON. This change trims the output by finding the first occurrence of the opening curly brace for the JSON payload so that it can be properly parsed as JSON.
I appreciate you taking the time to diagnose this and make the PR! Before merging though, I'd like to understand a little more about what's going on. A few thoughts/questions:
--json
is specified to prevent exactly the sort of problem you're experiencing here. So that's why I'm interested in where this log message is coming from.. it should already be suppressed!Also, I generally like to see unit test updates with PRs as well. But if you don't want to take a stab at that for this one, please let me know.
Thanks!
Actually, it looks like this is my doing. I was debugging an issue with an upgrade and added some print statement that I forgot to get rid of. This PR can be closed.
Sounds good. I'm glad it's working for you now!
Pull request closed