mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
13 lines
277 B
Python
Executable File
13 lines
277 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import sys
|
|
import xml.etree.ElementTree as ET
|
|
|
|
# Try to decode line in order to ensure it is a valid XML document
|
|
for line in sys.stdin:
|
|
try:
|
|
ET.fromstring(line)
|
|
except ET.ParseError:
|
|
print("Invalid xml: %r" % line)
|
|
raise
|