* switched xml.etreeElementTree for defusexml

- removed unnecessary pass statement
This commit is contained in:
nico 2018-10-03 23:36:59 +02:00
parent 825167b8aa
commit 6c6c14b55f

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
import xml.etree.ElementTree as ET
import defusedxml.ElementTree as ET
class XEPRequest:
@ -24,9 +24,8 @@ class XEPRequest:
try:
with open(".etag") as file:
local_etag = file.read()
except FileExistsError:
except FileNotFoundError:
local_etag = ""
pass
with requests.Session() as s:
s.headers.update({'Accept': 'application/xml'})