diff options
-rw-r--r-- | Modules/posixmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index f7b16a0..2a1efa6 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -300,7 +300,8 @@ convertenviron() if (v == NULL) continue; *p = '\0'; - (void) PyDict_SetItemString(d, *e, v); + if (PyDict_GetItemString(d, *e) == NULL) + (void) PyDict_SetItemString(d, *e, v); *p = '='; Py_DECREF(v); } |