New submission from Iñigo Serna:
Pathlib .owner() and .group() methods fail on broken symlinks.
They use:
return pwd.getpwuid(self.stat().st_uid).pw_name
and:
return grp.getgrgid(self.stat().st_gid).gr_name
It should be self.lstat().
Attached simple fix as unified diff.
----------
components: Library (Lib)
files: pathlib-34-owner_group_fixed.diff
keywords: patch
messages: 216950
nosy: inigoserna
priority: normal
severity: normal
status: open
title: Pathlib .owner() and .group() methods fail on broken links
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file34992/pathlib-34-owner_group_fixed.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21322>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com