[ovirt-devel] logging.captureWarnings only in Python 2.7, EL6 broken
Ondřej Svoboda
osvoboda at redhat.com
Tue Oct 21 17:07:09 UTC 2014
Hi all,
Sandro pointed out that tests are failing on
File "../tests/testrunner.py", line 33, in <module>
logging.captureWarnings(True)
AttributeError: 'module' object has no attribute 'captureWarnings'
The code, conditionally using the function also in our daemon, has been introduced on http://gerrit.ovirt.org/#/c/34034, adding support for 'warnings' module.
I have dug in Python changelogs and found that captureWarnings has, sadly, never been backported to Python 2.6. I have seen another project [1] employ the function only optionally. But for us, this probably makes the support for 'warnings' module in logging also optional in effect.
Saggi, I wanted to notice you about this. Do you think 'warnings' could be made to work in a different way, or are they only possible on platforms having Python 2.7+?
[1] https://github.com/josegonzalez/python-beaver/blob/master/beaver/utils.py#L90
More information about the Devel
mailing list