This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ethan.furman, serhiy.storchaka
Date 2014-09-29.19:02:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412017349.12.0.299082842103.issue22513@psf.upfronthosting.co.za>
In-reply-to
Content
This is because grp.struct_group contains unhashable component (a list).

Same behavior with tuple:

>>> tuple(grp.getgrgid(1000))
('serhiy', 'x', 1000, [])
>>> set(tuple(grp.getgrgid(1000)))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'list'
>>> set([tuple(grp.getgrgid(1000))])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'list'

Instead a set of grp.struct_group, create a dict, which maps group name to grp.struct_group.
History
Date User Action Args
2014-09-29 19:02:29serhiy.storchakasetrecipients: + serhiy.storchaka, ethan.furman
2014-09-29 19:02:29serhiy.storchakasetmessageid: <1412017349.12.0.299082842103.issue22513@psf.upfronthosting.co.za>
2014-09-29 19:02:29serhiy.storchakalinkissue22513 messages
2014-09-29 19:02:29serhiy.storchakacreate