Skip to content
Snippets Groups Projects

Update Formats, Dependencies, and Dockerfile Configuration

Merged Thorge Petersen requested to merge dev into main
61 files
+ 1629
141
Compare changes
  • Side-by-side
  • Inline
Files
61
+ 20
0
 
import xml.etree.ElementTree as ET
 
 
 
def is_valid(resource, file):
 
"""Check if the HTTP response is an ATOM feed."""
 
 
with open(file.name, "rb") as f:
 
try:
 
xml = ET.parse(f).getroot()
 
 
if xml.tag == "{http://www.w3.org/2005/Atom}feed":
 
return True
 
else:
 
resource["error"] = (
 
"Root element is not {http://www.w3.org/2005/Atom}feed"
 
)
 
return False
 
except Exception as e:
 
resource["error"] = str(e)
 
return False
Loading