Closed ldo closed 4 years ago
Sorry, noticed an omission in the patch. Update enclosed.
Hi,
Refactoring the way error handling is dome is, I consider, more a matter of taste. I'd like to discuss that separately from fixing an actual bug. Can you rebase and split the patch into bug-fix and rework-error-handling?
Code quality has nothing to do with “taste” (whatever that might mean).
Error handling methods, as long as correct, are a matter of style, and not of "quality". I'll fix the PyList_Append error checking, if you do want to send a pull request for the refactoring, please do that separately.
I notice your
xattr_get
routine is missing a check for an error from thePyList_Append
call.While I was at it, I took the opportunity to rework the
xattr_get
logic to reduce the complexity of the control paths, eliminating all thegoto
s. As you can see from the enclosed patch, it becomes much easier to verify that everything will be be correctly disposed regardless of what errors might occur.ldo-xattr_get.patch.txt