summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-04 16:06:26 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 23:05:14 +0100
commitdd732eeedd646363007bde0764d73d419613d9f6 (patch)
tree7ba10e7cf743e5690d5ae67fe8df96462e4a921f /scripts/lib
parenta173885ccfcff1099fa47c0f84913d14ac26079f (diff)
downloadpoky-dd732eeedd646363007bde0764d73d419613d9f6.tar.gz
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] (From OE-Core rev: a56924b4a0102e401b5e37d857a08bab15da974e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/wic/msger.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py
index 2340ac2f10..4d8e704172 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'):
66 # skip 66 # skip
67 return 67 return
68 68
69 # encode raw 'unicode' str to utf8 encoded str
70 if msg and isinstance(msg, unicode):
71 msg = msg.encode('utf-8', 'ignore')
72
73 errormsg = '' 69 errormsg = ''
74 if CATCHERR_BUFFILE_FD > 0: 70 if CATCHERR_BUFFILE_FD > 0:
75 size = os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_END) 71 size = os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_END)
@@ -118,9 +114,6 @@ def _color_print(head, color, msg, stream, level):
118 newline = True 114 newline = True
119 115
120 if msg is not None: 116 if msg is not None:
121 if isinstance(msg, unicode):
122 msg = msg.encode('utf8', 'ignore')
123
124 stream.write('%s%s' % (head, msg)) 117 stream.write('%s%s' % (head, msg))
125 if newline: 118 if newline:
126 stream.write('\n') 119 stream.write('\n')