[oe-commits] [openembedded-core] 15/21: wic: don't encode unicode strings

git at git.openembedded.org git at git.openembedded.org
Fri May 13 17:10:52 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 62f65be462d8125bfe3ece00a58c97a045a0820c
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed May 4 16:06:26 2016 +0300

    wic: don't encode unicode strings
    
    Removed check for unicode type as it doesn't work in Python 3.
    This check is not needed for wic as all its output seem to be
    strings. This allows to run code under both pythons.
    
    [YOCTO #9412]
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/wic/msger.py | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py
index 2340ac2..4d8e704 100644
--- a/scripts/lib/wic/msger.py
+++ b/scripts/lib/wic/msger.py
@@ -66,10 +66,6 @@ def _general_print(head, color, msg=None, stream=None, level='normal'):
         # skip
         return
 
-    # encode raw 'unicode' str to utf8 encoded str
-    if msg and isinstance(msg, unicode):
-        msg = msg.encode('utf-8', 'ignore')
-
     errormsg = ''
     if CATCHERR_BUFFILE_FD > 0:
         size = os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_END)
@@ -118,9 +114,6 @@ def _color_print(head, color, msg, stream, level):
                 newline = True
 
     if msg is not None:
-        if isinstance(msg, unicode):
-            msg = msg.encode('utf8', 'ignore')
-
         stream.write('%s%s' % (head, msg))
         if newline:
             stream.write('\n')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list