Re: [yocto] [error-report-web][PATCH] parser: Add Unicode support to the error log

2015-09-30 Thread Michael Wood

On 30/09/15 14:54, mariano.lo...@linux.intel.com wrote:

From: Mariano Lopez 

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 
---
  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



--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [error-report-web][PATCH] parser: Add Unicode support to the error log

2015-09-30 Thread mariano . lopez
From: Mariano Lopez 

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 
---
 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

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto