From 6c6c14b55fdbf3f79e21f961354952190b443a6b Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 3 Oct 2018 23:36:59 +0200 Subject: * switched xml.etreeElementTree for defusexml - removed unnecessary pass statement --- classes/xep.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/xep.py b/classes/xep.py index 6293c27..9e4f61f 100644 --- a/classes/xep.py +++ b/classes/xep.py @@ -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'}) -- cgit v1.2.3-54-g00ecf