[issue18678] Wrong struct members name for spwd module

Vajrasky Kok report at bugs.python.org
Sun Aug 18 17:04:48 CEST 2013


Vajrasky Kok added the comment:

Attached the patch to accommodate R. David Murray's request. Accessing invalid attributes such as sp_nam and sp_pwd from spwd tuple will generate deprecation warning message.

Also, I added test function so we can run spwd module directly. This is useful because I don't think we can unit test spwd module. (This module can be used only if you are root.)

The Modules/spwdmodule.c file is supposed to be Modules/_spwdmodule.c following tradition but that will make the review process harder. If this patch is good to go, I'll rename the module file later.

----------
Added file: http://bugs.python.org/file31358/spwd_struct_members_name_fix_v2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18678>
_______________________________________


More information about the Python-bugs-list mailing list