| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 41.67% |
| Changes | 0 | ||
| 1 | 1 | from lxml import etree |
|
| 2 | |||
| 3 | 1 | from .namespaces import NAMESPACES |
|
| 4 | |||
| 5 | |||
| 6 | 1 | class DescriptionParser(): |
|
| 7 | 1 | @staticmethod |
|
| 8 | 1 | def get_full_description(item): |
|
| 9 | description = item.find(".//xccdf:description", NAMESPACES) |
||
| 10 | if description is None: |
||
| 11 | return None |
||
| 12 | str_description = etree.tostring(description).decode() |
||
| 13 | start_tag_description = str_description.find(">") + 1 |
||
| 14 | end_tag_description = str_description.rfind("</") |
||
| 15 | return str_description[start_tag_description:end_tag_description].replace("html:", "") |
||
| 16 |