[sos-devel] [PATCH v3] sosreport: Check for rpm database corruption during initialization

Aruna Balakrishnaiah aruna at linux.vnet.ibm.com
Fri Dec 12 05:24:32 UTC 2014


On Thursday 11 December 2014 04:44 PM, Bryn M. Reeves wrote:
> On Thu, Dec 11, 2014 at 12:15:30PM +0530, Aruna Balakrishnaiah wrote:
>> On Wednesday 10 December 2014 11:02 PM, Bryn M. Reeves wrote:
>>> Why use distutils.log here? It's not used anywhere else in sos; it
>>> would be cleaner to just print to stderr:
>>>
>>>      print(error_message, file=sys.stderr)
>> Bryn,
>>
>> This is available only since Python 3.0, lower versions are not supporting this.
> No that's not correct - 3.0 just makes the print function the default
> (and remove the print statement). The print() function is available in
> python 2.6 (our oldest supported runtime) and onwards via the __future__
> module:
>
> # python
> Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from __future__ import print_statement

In python 2.7 it is print_function and not print_statement.

Will send the patch with this change.

Regards,
Aruna




More information about the sos-devel mailing list