From f7f600e7309876df56d881c47e0f280be0f1e9ce Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 2 Sep 2016 17:41:32 -0300 Subject: [PATCH] validate: launcher: Fix the condition to check if we need an http server We could be checking if a string was in None And use gs_string_assign when assigning the first string without using printf like format. --- validate/gst/validate/gst-validate-report.c | 4 ++-- validate/launcher/apps/gstvalidate.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index 15b88e16ec..02a45cfd07 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -705,7 +705,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args) if (_action_check_and_set_printed (action)) goto out; - g_string_printf (string, "Executing "); + g_string_assign (string, "Executing "); } else if (*(GType *) source == GST_TYPE_VALIDATE_ACTION_TYPE) { gint i; @@ -726,7 +726,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args) GstValidateActionType *type = GST_VALIDATE_ACTION_TYPE (source); - g_string_printf (string, "\nAction type:"); + g_string_assign (string, "\nAction type:"); g_string_append_printf (string, "\n Name: %s", type->name); g_string_append_printf (string, "\n Implementer namespace: %s", type->implementer_namespace); diff --git a/validate/launcher/apps/gstvalidate.py b/validate/launcher/apps/gstvalidate.py index 63dba93aa0..5e6c2b9ede 100644 --- a/validate/launcher/apps/gstvalidate.py +++ b/validate/launcher/apps/gstvalidate.py @@ -720,8 +720,8 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""") uri = test.media_descriptor.get_uri() if protocol in [Protocols.HTTP, Protocols.HLS, Protocols.DASH] and \ - "127.0.0.1:%s" % (self.options.http_server_port) in uri or \ - "127.0.0.1:8079" in uri: + ("127.0.0.1:%s" % (self.options.http_server_port) in uri or + "127.0.0.1:8079" in uri): return True return False