summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/sysmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index d6ccd17..5293c97 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -943,7 +943,7 @@ PySys_AddWarnOption(char *s)
int
PySys_HasWarnOptions(void)
{
- return warnoptions ? 1 : 0;
+ return (warnoptions != NULL && (PyList_Size(warnoptions) > 0)) ? 1 : 0;
}
/* XXX This doc string is too long to be a single string literal in VC++ 5.0.