[PATCH] [*/utils/verify-input-sanity.py] Enhance 7031613 change -- show also what kind of error happened & line number it happened at

Jan Lieskovsky jlieskov at redhat.com
Mon Jul 7 13:23:10 UTC 2014


This patch enhances the change introduced in:
  [1] https://git.fedorahosted.org/cgit/scap-security-guide.git/commit/?id=7031613

it to be yet more verbose. Instead of reporting just file name, the error happened in,
report also what kind of error happened & particular line number of that processed file,
causing / leading to this error.

Current verify-input-sanity.py output:

  utils]$ ./verify-input-sanity.py 

  XML syntax error in file: src/input/checks/platform/rhel6-cpe-dictionary.xml
  XML syntax error in file: src/input/auxiliary/stig_overlay.xml

Output once the change is applied:

  utils]$ ./verify-input-sanity.py 

  XML syntax error in file src/input/checks/platform/rhel6-cpe-dictionary.xml:
  XML declaration allowed only at the start of the document, line 1, column 49 

  XML syntax error in file src/input/auxiliary/stig_overlay.xml:
  XML declaration allowed only at the start of the document, line 1, column 49 

The patch changes the behaviour all across the content (i.e. for verify-input-sanity.py 
foreach of RHEL/6, RHEL/7, Fedora, Openstack & RHEVM3 -- tested for all cases, works fine).

Please review.

Thank you && Regards, Jan.
--
Jan iankko Lieskovsky / Red Hat Security Technologies Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-utils-verify-input-sanity.py-Enhance-7031613-change-.patch
Type: text/x-patch
Size: 4856 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/scap-security-guide/attachments/20140707/f24b473e/attachment.bin>


More information about the scap-security-guide mailing list