| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…17225) Commit 6b5b013 ("bpo-26978: Implement pathlib.Path.link_to (Using os.link) (pythonGH-12990)") introduced a new link_to method in pathlib. However, this makes pathlib crash when the 'os' module is missing a 'link' method. Fix this by checking for the presence of the 'link' method on pathlib module import, and if it's not present, turn it into a runtime error like those emitted when there is no lchmod() or symlink(). Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> (cherry picked from commit 092435e) Co-authored-by: Toke Høiland-Jørgensen <toke@redhat.com>
There was a problem hiding this comment.
LGTM, good bot.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Commit 6b5b013 ("bpo-26978: Implement pathlib.Path.link_to (Using
os.link) (GH-12990)") introduced a new link_to method in pathlib. However,
this makes pathlib crash when the 'os' module is missing a 'link' method.
Fix this by checking for the presence of the 'link' method on pathlib
module import, and if it's not present, turn it into a runtime error like
those emitted when there is no lchmod() or symlink().
Signed-off-by: Toke Høiland-Jørgensen toke@redhat.com
(cherry picked from commit 092435e)
Co-authored-by: Toke Høiland-Jørgensen toke@redhat.com
https://bugs.python.org/issue38811