All of lore.kernel.org
 help / color / mirror / Atom feed
* [error-report-web][PATCH] parser: Add Unicode support to the error log
@ 2015-09-30 13:54 mariano.lopez
  2015-09-30 14:31 ` Michael Wood
  0 siblings, 1 reply; 2+ messages in thread
From: mariano.lopez @ 2015-09-30 13:54 UTC (permalink / raw)
  To: yocto

From: Mariano Lopez <mariano.lopez@linux.intel.com>

If the server receives a error log with Unicode
character in it, it will throw and internal server
error, this is caused because the server doesn't
try to convert everything to ASCII

This patch changes the log encoding to UTF-8 so
it will allow Unicode characters.

[YOCTO #8225]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
 Post/parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Post/parser.py b/Post/parser.py
index d33a968..599afde 100644
--- a/Post/parser.py
+++ b/Post/parser.py
@@ -85,7 +85,7 @@ class Parser:
                 recipe = package
                 recipe_version = "unknown"
 
-            f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, RECIPE_VERSION = recipe_version, ERROR_DETAILS = str(fail['log']), BUILD = b)
+            f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, RECIPE_VERSION = recipe_version, ERROR_DETAILS = fail['log'].encode('utf-8'), BUILD = b)
 
             f.save()
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [error-report-web][PATCH] parser: Add Unicode support to the error log
  2015-09-30 13:54 [error-report-web][PATCH] parser: Add Unicode support to the error log mariano.lopez
@ 2015-09-30 14:31 ` Michael Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Wood @ 2015-09-30 14:31 UTC (permalink / raw)
  To: mariano.lopez, yocto

On 30/09/15 14:54, mariano.lopez@linux.intel.com wrote:
> From: Mariano Lopez <mariano.lopez@linux.intel.com>
>
> If the server receives a error log with Unicode
> character in it, it will throw and internal server
> error, this is caused because the server doesn't
> try to convert everything to ASCII
>
> This patch changes the log encoding to UTF-8 so
> it will allow Unicode characters.
>
> [YOCTO #8225]
>
> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
> ---
>   Post/parser.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Post/parser.py b/Post/parser.py
> index d33a968..599afde 100644
> --- a/Post/parser.py
> +++ b/Post/parser.py
> @@ -85,7 +85,7 @@ class Parser:
>                   recipe = package
>                   recipe_version = "unknown"
>   
> -            f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, RECIPE_VERSION = recipe_version, ERROR_DETAILS = str(fail['log']), BUILD = b)
> +            f = BuildFailure(TASK = str(fail['task']), RECIPE = recipe, RECIPE_VERSION = recipe_version, ERROR_DETAILS = fail['log'].encode('utf-8'), BUILD = b)
>   
>               f.save()
>   

Thanks for the patch. Now committed.

Michael





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-30 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 13:54 [error-report-web][PATCH] parser: Add Unicode support to the error log mariano.lopez
2015-09-30 14:31 ` Michael Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.