mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-09 08:57:46 +02:00
2019-09-02 Fred Gleason <fredg@paravelsystems.com>
* Modified the 'pypad' module so as not to throw a 'UnicodeDecodeError' exception when processing a PAD update containing an invalid UTF-8 character.
This commit is contained in:
parent
1b70e21d0e
commit
a6c1361d43
@ -19080,3 +19080,7 @@
|
||||
2019-09-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the 'pypad' module that caused the DB connection
|
||||
to be opened in 'latin1' mode.
|
||||
2019-09-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified the 'pypad' module so as not to throw a
|
||||
'UnicodeDecodeError' exception when processing a PAD update
|
||||
containing an invalid UTF-8 character.
|
||||
|
@ -908,8 +908,9 @@ class Receiver(object):
|
||||
c=sock.recv(1)
|
||||
line+=c
|
||||
if c[0]==10:
|
||||
msg+=line.decode('utf-8')
|
||||
if line.decode('utf-8')=="\r\n":
|
||||
linebytes=line.decode('utf-8','replace')
|
||||
msg+=linebytes
|
||||
if linebytes=='\r\n':
|
||||
self.__pypad_Process(Update(json.loads(msg),self.__config_parser,rd_config))
|
||||
msg=""
|
||||
line=bytes()
|
||||
|
Loading…
x
Reference in New Issue
Block a user