Message227816
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. |
|
Date |
User |
Action |
Args |
2014-09-29 19:02:29 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ethan.furman |
2014-09-29 19:02:29 | serhiy.storchaka | set | messageid: <1412017349.12.0.299082842103.issue22513@psf.upfronthosting.co.za> |
2014-09-29 19:02:29 | serhiy.storchaka | link | issue22513 messages |
2014-09-29 19:02:29 | serhiy.storchaka | create | |
|