[Python-checkins] r62305 - python/trunk/Python/sysmodule.c
brett.cannon
python-checkins at python.org
Sun Apr 13 02:18:44 CEST 2008
Author: brett.cannon
Date: Sun Apr 13 02:18:44 2008
New Revision: 62305
Log:
Fix a bug in PySys_HasWarnOption() where it was not properly checking the
length of the list storing the warning options.
Modified:
python/trunk/Python/sysmodule.c
Modified: python/trunk/Python/sysmodule.c
==============================================================================
--- python/trunk/Python/sysmodule.c (original)
+++ python/trunk/Python/sysmodule.c Sun Apr 13 02:18:44 2008
@@ -943,7 +943,7 @@
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.
More information about the Python-checkins
mailing list