mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
temp fallback to built-in ElementTree if defusedxml is not there
This commit is contained in:
parent
cf4c9cb4ee
commit
9bccb2c73e
1 changed files with 6 additions and 1 deletions
|
@ -39,7 +39,12 @@ import base64
|
|||
import zipfile
|
||||
import tempfile
|
||||
import json
|
||||
import defusedxml.ElementTree as XMLElementTree
|
||||
|
||||
# TODO change to only import defusedxml once its installed everywhere
|
||||
try:
|
||||
import defusedxml.ElementTree as XMLElementTree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as XMLElementTree # nosec this is a fallback only
|
||||
|
||||
from binascii import hexlify
|
||||
from datetime import datetime, timedelta
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue