Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/5632c9c8c0e8ddf3b5945fd36b19dff7367851c5
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/5632c9c8c0e8ddf3b5945fd36b19dff7367851c5
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/5632c9c8c0e8ddf3b5945fd36b19dff7367851c5

The branch, master has been updated
       via  5632c9c8c0e8ddf3b5945fd36b19dff7367851c5 (commit)
      from  bcc64cf263cd730ba8c13d31870528c160403e88 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=5632c9c8c0e8ddf3b5945fd36b19dff7367851c5
commit 5632c9c8c0e8ddf3b5945fd36b19dff7367851c5
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    stop bad unicode data from crashing teh test harness
    
    instead of exploding if monkey returns a bad unicode string instead
     a warning will be reported and the unicode decode performed with
     character replacemnt instead

diff --git a/test/monkeyfarmer.py b/test/monkeyfarmer.py
index cbdda0c..4dfc41a 100644
--- a/test/monkeyfarmer.py
+++ b/test/monkeyfarmer.py
@@ -115,7 +115,11 @@ class MonkeyFarmer(asyncore.dispatcher):
         self.buffer += cmd.encode('utf-8')
 
     def monkey_says(self, line):
-        line = line.decode('utf-8')
+        try:
+            line = line.decode('utf-8')
+        except UnicodeDecodeError:
+            print("WARNING: Unicode decode error")
+            line = line.decode('utf-8', 'replace')
         if not self.quiet:
             print("<<< {}".format(line))
         self.discussion.append(("<", line))


-----------------------------------------------------------------------

Summary of changes:
 test/monkeyfarmer.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/monkeyfarmer.py b/test/monkeyfarmer.py
index cbdda0c..4dfc41a 100644
--- a/test/monkeyfarmer.py
+++ b/test/monkeyfarmer.py
@@ -115,7 +115,11 @@ class MonkeyFarmer(asyncore.dispatcher):
         self.buffer += cmd.encode('utf-8')
 
     def monkey_says(self, line):
-        line = line.decode('utf-8')
+        try:
+            line = line.decode('utf-8')
+        except UnicodeDecodeError:
+            print("WARNING: Unicode decode error")
+            line = line.decode('utf-8', 'replace')
         if not self.quiet:
             print("<<< {}".format(line))
         self.discussion.append(("<", line))


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to