-
Notifications
You must be signed in to change notification settings - Fork 19
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
Error codes #126
Error codes #126
Conversation
16dfc0d
to
d7cb6b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added a few comments to improve readibility
@@ -149,8 +149,10 @@ def _raise_status(self, path, status): | |||
"""Raise error based on status.""" | |||
# 3006 - legacy (v4 errno), 17 - POSIX error, 3018 (xrootd v5 errno) | |||
if status.errno in [3006, 17, 3018]: | |||
if status.message.strip().endswith("directory not empty"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the suggestion, I added it to our generic issue about improving errors, for now I patched it until we have some breathing room for proper solution
see #122
@@ -405,7 +407,7 @@ def removedir(self, path, recursive=False, force=False): | |||
status, _ = self._client.rmdir(self._p(path)) | |||
|
|||
if not status.ok: | |||
directory_not_empty_error = status.errno == 3005 | |||
directory_not_empty_error = status.errno in [3005, 3018] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like that 3005 is not that error, it is a bit misleading (it was there before).
No description provided.