diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-06-27 00:52:15 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-06-27 00:52:15 (GMT) |
commit | db7349128faa564954554da95ce7bfb8802ff31f (patch) | |
tree | 5dbf92d7a143b344b364de942984462cc2b66ecb /Lib/warnings.py | |
parent | 429ef650b749efcade39b5f65862f546610a8191 (diff) | |
download | cpython-db7349128faa564954554da95ce7bfb8802ff31f.zip cpython-db7349128faa564954554da95ce7bfb8802ff31f.tar.gz cpython-db7349128faa564954554da95ce7bfb8802ff31f.tar.bz2 |
Merged revisions 64549 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64549 | brett.cannon | 2008-06-26 17:31:13 -0700 (Thu, 26 Jun 2008) | 7 lines
warnings.warn_explicit() did not have the proper TypeErrors in place to prevent
bus errors or SystemError being raised. As a side effect of fixing this, a bad
DECREF that could be triggered when 'message' and 'category' were both None was
fixed.
Closes issue 3211. Thanks JP Calderone for the bug report.
........
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r-- | Lib/warnings.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py index 9353bfa..bcd702c 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -188,6 +188,7 @@ def warn(message, category=None, stacklevel=1): def warn_explicit(message, category, filename, lineno, module=None, registry=None, module_globals=None): + lineno = int(lineno) if module is None: module = filename or "<unknown>" if module[-3:].lower() == ".py": |