diff --git a/apps/terminal/applets/dbeaver/app.py b/apps/terminal/applets/dbeaver/app.py index ab4244eb0..d31f75000 100644 --- a/apps/terminal/applets/dbeaver/app.py +++ b/apps/terminal/applets/dbeaver/app.py @@ -2,8 +2,8 @@ import os import shutil import subprocess import time -from xml.etree import ElementTree -from xml.sax import SAXException +from defusedxml import ElementTree +from defusedxml.common import DefusedXmlException import win32api @@ -85,7 +85,7 @@ class AppletApplication(BaseApplication): driver_yml_file = os.path.join(driver_yml_path, 'drivers.xml') try: self._merge_driver_xml('./config/drivers.xml', driver_yml_file) - except (SAXException, FileNotFoundError): + except (DefusedXmlException, FileNotFoundError): os.makedirs(driver_yml_path, exist_ok=True) shutil.copy('./config/drivers.xml', driver_yml_file) diff --git a/pyproject.toml b/pyproject.toml index 8aeeb3b0b..fc5c8bf35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -157,6 +157,7 @@ dependencies = [ "pyhttpsig==1.3.0", "requests-unixsocket==0.4.1", "telnetlib3==4.0.2", + "defusedxml>=0.7.1", ] [project.urls]