From 95cd741904dd9072977f1dffcf988974f4a2d59a Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 5 Aug 2011 19:16:40 +0000 Subject: [PATCH] * gstreamer.py: Add quoteParse() method. --- morituri/extern/task/ChangeLog | 5 +++++ morituri/extern/task/gstreamer.py | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/morituri/extern/task/ChangeLog b/morituri/extern/task/ChangeLog index bdade9d..907a2bf 100644 --- a/morituri/extern/task/ChangeLog +++ b/morituri/extern/task/ChangeLog @@ -1,3 +1,8 @@ +2011-08-05 Thomas Vander Stichele + + * gstreamer.py: + Add quoteParse() method. + 2011-08-05 Thomas Vander Stichele * gstreamer.py: diff --git a/morituri/extern/task/gstreamer.py b/morituri/extern/task/gstreamer.py index 91e69ec..98486a6 100644 --- a/morituri/extern/task/gstreamer.py +++ b/morituri/extern/task/gstreamer.py @@ -22,6 +22,16 @@ import task +def quoteParse(path): + """ + Quote a path for use in gst.parse_launch. + """ + # Make sure double quotes are escaped. See + # morituri.test.test_common_checksum + + return path.replace('"', '\\"') + + class GstException(Exception): def __init__(self, gerror, debug): self.args = (gerror, debug, )