From: Guido van Rossum Date: Sun, 26 Jan 1992 18:15:48 +0000 (+0000) Subject: sysset(name, NULL) does nothing if sys.name is undefined X-Git-Tag: v0.9.8~552 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ad58c6aef158666fe94fefd9fc646483f6ad044;p=thirdparty%2FPython%2Fcpython.git sysset(name, NULL) does nothing if sys.name is undefined --- diff --git a/Python/sysmodule.c b/Python/sysmodule.c index d725c88cc8b0..7089fc7a3d81 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -85,8 +85,12 @@ sysset(name, v) char *name; object *v; { - if (v == NULL) - return dictremove(sysdict, name); + if (v == NULL) { + if (dictlookup(sysdict, name) == NULL) + return 0; + else + return dictremove(sysdict, name); + } else return dictinsert(sysdict, name, v); }