mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
validate:launcher: Add information on media info files parsing failures
This commit is contained in:
parent
95a5a3a62c
commit
49271bc721
1 changed files with 9 additions and 2 deletions
|
@ -33,8 +33,10 @@ import urllib.parse
|
|||
import subprocess
|
||||
import threading
|
||||
import queue
|
||||
from . import reporters
|
||||
import configparser
|
||||
import xml
|
||||
|
||||
from . import reporters
|
||||
from . import loggable
|
||||
from .loggable import Loggable
|
||||
import xml.etree.cElementTree as ET
|
||||
|
@ -1923,7 +1925,12 @@ class GstValidateMediaDescriptor(MediaDescriptor):
|
|||
super(GstValidateMediaDescriptor, self).__init__()
|
||||
|
||||
self._xml_path = xml_path
|
||||
self.media_xml = ET.parse(xml_path).getroot()
|
||||
try:
|
||||
self.media_xml = ET.parse(xml_path).getroot()
|
||||
except xml.etree.ElementTree.ParseError:
|
||||
printc("Could not parse %s" % xml_path,
|
||||
Colors.FAIL)
|
||||
raise
|
||||
|
||||
# Sanity checks
|
||||
self.media_xml.attrib["duration"]
|
||||
|
|
Loading…
Reference in a new issue