[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

STINNER Victor report at bugs.python.org
Mon May 9 17:10:48 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Main changes of the patch, if the current user has no home directory (no entry in /etc/passwd) and there is HOME environment variable:

 - sysconfig.get_config_vars() doesn't have a 'userbase' variable. sysconfig.get_config_var('userbase') returns None as any other nonexistent key.
 - sysconfig.get_paths() doesn't create a path if expand fails (without raising an error or emiting a warning). For example, sysconfig.get_paths(scheme='posix_user') returns an empty dict.

----------

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


More information about the Python-bugs-list mailing list