From 3dd8c9895ec5ffca4c8a2288b54dc209068cb434 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 3 Jun 1992 17:07:49 +0000 Subject: fixed bugs in generic_setattr (returned NULL instead of -1 for errors) --- Modules/flmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/flmodule.c b/Modules/flmodule.c index 2d26533..d8c423c 100644 --- a/Modules/flmodule.c +++ b/Modules/flmodule.c @@ -325,7 +325,7 @@ generic_setattr(g, name, v) if (v == NULL) { err_setstr(TypeError, "can't delete forms object attributes"); - return NULL; + return -1; } /* "label" is an exception: setmember doesn't set strings; @@ -333,7 +333,7 @@ generic_setattr(g, name, v) if (strcmp(name, "label") == 0) { if (!is_stringobject(v)) { err_setstr(TypeError, "label attr must be string"); - return NULL; + return -1; } fl_set_object_label(g->ob_generic, getstringvalue(v)); return 0; -- cgit v0.12