mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
validate:launcher: escape the characters to remove bad range in regex
When media file name consists of some special characters of the format [b-a].mp3, then it fails with 'bad character range' error and exits. call re.escape to escape the characters before using it in findall https://bugzilla.gnome.org/show_bug.cgi?id=752650
This commit is contained in:
parent
ac172a9ac6
commit
94c684d401
1 changed files with 1 additions and 1 deletions
|
@ -1371,7 +1371,7 @@ class ScenarioManager(Loggable):
|
|||
mfile_bname = os.path.basename(mfile)
|
||||
|
||||
for f in os.listdir(os.path.dirname(mfile)):
|
||||
if re.findall("%s\..*\.%s$" % (mfile_bname, self.FILE_EXTENSION), f):
|
||||
if re.findall("%s\..*\.%s$" % (re.escape(mfile_bname), self.FILE_EXTENSION), f):
|
||||
scenarios.append(os.path.join(os.path.dirname(mfile), f))
|
||||
|
||||
if scenarios:
|
||||
|
|
Loading…
Reference in a new issue