]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #20306: Android is the only system that returns NULL for the pw_passwd
authorStefan Krah <skrah@bytereef.org>
Tue, 26 Apr 2016 09:43:21 +0000 (11:43 +0200)
committerStefan Krah <skrah@bytereef.org>
Tue, 26 Apr 2016 09:43:21 +0000 (11:43 +0200)
field.  Rather than cluttering the tests, translate the arguably more correct
"None" to an empty string.

Modules/pwdmodule.c

index c5032562e61cb548b9fd1c37f7cd5efb85570587..61be3b2157f4be648b28dcd9d9f5a5297f4fc098 100644 (file)
@@ -75,7 +75,7 @@ mkpwent(struct passwd *p)
 #define SETS(i,val) sets(v, i, val)
 
     SETS(setIndex++, p->pw_name);
-#if defined(HAVE_STRUCT_PASSWD_PW_PASSWD)
+#if defined(HAVE_STRUCT_PASSWD_PW_PASSWD) && !defined(__ANDROID__)
     SETS(setIndex++, p->pw_passwd);
 #else
     SETS(setIndex++, "");