diff --git a/cli_support/CLI.py b/cli_support/CLI.py index 5adc109..2226854 100644 --- a/cli_support/CLI.py +++ b/cli_support/CLI.py @@ -7,8 +7,8 @@ # SPDX-License-Identifier: MIT # ------------------------------------------------------------------------------- +import sys import xml.etree.ElementTree as ET -# from typing import List from typing import Any from .cli_assessment_summary import CliAssessmentSummary @@ -201,5 +201,6 @@ def write_to_file(self, filename: str) -> None: comment.append(cdata) tree = ET.ElementTree(root) - ET.indent(tree) + if sys.version_info[:3] > (3, 8): + ET.indent(tree) tree.write(filename, encoding="UTF-8") diff --git a/cli_support/license_tools.py b/cli_support/license_tools.py index 659717a..443d714 100644 --- a/cli_support/license_tools.py +++ b/cli_support/license_tools.py @@ -7,7 +7,7 @@ # SPDX-License-Identifier: MIT # ------------------------------------------------------------------------------- -from typing import Optional, List +from typing import List, Optional from .CLI import CliFile from .cli_license import CliLicense