Message262353
| Author |
vstinner |
| Recipients |
Arfrever, msmhrt, ned.deily, pitrou, python-dev, serhiy.storchaka, vstinner |
| Date |
2016年03月24日.15:10:47 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1458832248.19.0.24241631051.issue21925@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It looks like the warnings is logged when the C implemention is used. When the Python implementation is used, "import linecache" or "linecache.getline()" fail, and so the warnings is skipped.
Attached patch makes the Python implementation safer when Python is shutting down. Add "try/except Exception" to ignore exceptions on import, linecache and tracemalloc. |
|