On 10/03/2012 12:42 PM, Lucas Meneghel Rodrigues wrote:
On 10/03/2012 11:47 AM, Chris Evich wrote:
+ Cleaned up many pylint/style warnings
+ Added unique extension for temp files retained due to exception
+ Unified del/exit-handling behavior
+ Added XMLTreeFile method for retrieving an XPATH to an element
+ Improved unittests
Good stuff! Two minor comments:
Signed-off-by: Chris Evich <[email protected]>
+ def _info(self):
+ """
+ Inform user that file was not auto-deleted due to exceptional
exit.
+ """
+ logging.info("Retaining backup of %s in %s",
self.sourcefilename,
+ self.name + EXSFX)
^ For one, the info message here is inconsistent with the definition of
_info above, so better to make them equal.
This was done on purpose as the classes behave slightly differently.
The TempXMLFile is just any-ole-file, but XMLBackup comes from a copy of
a source file. Therefor _info logs both bits of information. Or am am
I missing something else?
---
We already talked about the commented code, but for others benefit:
ElementPath in python 2.6 and prior does not conform to the XPath RFC,
in fact it's horribly broken for all but the most simplistic uses. The
code required to conform with the RFC is in comments but won't work with
the broken 2.6 ElementPath. If/When we update to python 2.7 or 3.0,
that code will save me/someone from reading through the XPath RFC again.
--
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel