diff options
-rw-r--r-- | Python/sysmodule.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index d725c88..7089fc7 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); } |