remove ExpatError
This commit is contained in:
1 parent
7ac08d672f
commit
c2a1598fdd
1 file changed
+1
-2
@@ -24,7 +24,6 @@ from pathlib import Path
|
|||||||
import platform
|
import platform
|
||||||
from subprocess import STDOUT, PIPE, CalledProcessError
|
from subprocess import STDOUT, PIPE, CalledProcessError
|
||||||
from xml.dom.minidom import parseString
|
from xml.dom.minidom import parseString
|
||||||
from xml.parsers.expat import ExpatError
|
|
||||||
from .shared import IMAGE_TYPES, subprocess_run
|
from .shared import IMAGE_TYPES, subprocess_run
|
||||||
|
|
||||||
EXTRACTION_ERROR = 'Failed to extract archive. Try extracting file outside of KCC.'
|
EXTRACTION_ERROR = 'Failed to extract archive. Try extracting file outside of KCC.'
|
||||||
@@ -118,7 +117,7 @@ class ComicArchive:
|
|||||||
raise OSError(EXTRACTION_ERROR)
|
raise OSError(EXTRACTION_ERROR)
|
||||||
try:
|
try:
|
||||||
return parseString(process.stdout)
|
return parseString(process.stdout)
|
||||||
except ExpatError:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@lru_cache
|
@lru_cache
|
||||||
|
|||||||
Reference in new issue
Block a user