[oe-commits] [openembedded-core] 02/05: oeqa/target/ssh: Replace suggogatepass with latin-1 codec

git at git.openembedded.org git at git.openembedded.org
Mon May 13 14:07:31 UTC 2019


This is an automated email from the git hooks/post-receive script.

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

commit d25b4e8d882985bcdc17f9af8c288f64048e6613
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sun May 12 19:49:25 2019 +0100

    oeqa/target/ssh: Replace suggogatepass with latin-1 codec
    
    We continued to see encoding problems with ssh commands run in oeqa. After much
    research the conclusion was we should use the latin-1 coding which would avoid
    the problems.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/core/target/ssh.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index cf3d44d..3dee033 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -210,7 +210,7 @@ def SSHCall(command, logger, timeout=None, **opts):
                 logger.debug('time: %s, endtime: %s' % (time.time(), endtime))
                 try:
                     if select.select([process.stdout], [], [], 5)[0] != []:
-                        reader = codecs.getreader('utf-8')(process.stdout, 'surrogatepass')
+                        reader = codecs.getreader('latin-1')(process.stdout)
                         data = reader.read(1024, 4096)
                         if not data:
                             process.stdout.close()
@@ -237,7 +237,7 @@ def SSHCall(command, logger, timeout=None, **opts):
                 output += lastline
 
         else:
-            output = process.communicate()[0].decode("utf-8", errors='surrogatepass')
+            output = process.communicate()[0].decode('latin-1')
             logger.debug('Data from SSH call: %s' % output.rstrip())
 
     options = {

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


More information about the Openembedded-commits mailing list