File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
aws_doc_sdk_examples_tools Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,4 @@ def test_invalid_xml():
324324 first_error .value
325325 == "<fake><para>Certain characters like < are invalid</para></fake>"
326326 )
327- assert (
328- first_error .message ()
329- == "ParseError('not well-formed (invalid token): line 1, column 37')"
330- )
327+ assert first_error .message () == "not well-formed (invalid token): line 1, column 37"
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python3
21# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
32# SPDX-License-Identifier: Apache-2.0
43
@@ -174,7 +173,7 @@ def _validate_aws_entity_usage(value: str) -> bool:
174173 try :
175174 xtree = xml_tree .fromstring (xml_str )
176175 except ParseError as e :
177- raise ElementTreeParseError (message = repr ( e ) , raw = xml_str )
176+ raise ElementTreeParseError (message = f" { e } " , raw = xml_str ) from e
178177 blocks = (
179178 xtree .findall (".//programlisting" )
180179 + xtree .findall (".//code" )
You can’t perform that action at this time.
0 commit comments