mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +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 subprocess
|
||||||
import threading
|
import threading
|
||||||
import queue
|
import queue
|
||||||
from . import reporters
|
|
||||||
import configparser
|
import configparser
|
||||||
|
import xml
|
||||||
|
|
||||||
|
from . import reporters
|
||||||
from . import loggable
|
from . import loggable
|
||||||
from .loggable import Loggable
|
from .loggable import Loggable
|
||||||
import xml.etree.cElementTree as ET
|
import xml.etree.cElementTree as ET
|
||||||
|
@ -1923,7 +1925,12 @@ class GstValidateMediaDescriptor(MediaDescriptor):
|
||||||
super(GstValidateMediaDescriptor, self).__init__()
|
super(GstValidateMediaDescriptor, self).__init__()
|
||||||
|
|
||||||
self._xml_path = xml_path
|
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
|
# Sanity checks
|
||||||
self.media_xml.attrib["duration"]
|
self.media_xml.attrib["duration"]
|
||||||
|
|
Loading…
Reference in a new issue