mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-21 16:38:54 +02:00
2018-12-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'pypad_udp.py' script that threw an exception when processing multi-byte UTF-8 characters.
This commit is contained in:
parent
66d0d465c1
commit
e2a313a07d
@ -18159,3 +18159,6 @@
|
||||
'pypad_udp.py' script.
|
||||
* Added support for the log selection directives in the
|
||||
'pypad_udp.py' script.
|
||||
2018-12-10 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the 'pypad_udp.py' script that threw an exception
|
||||
when processing multi-byte UTF-8 characters.
|
||||
|
@ -20,15 +20,15 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
#from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import socket
|
||||
import ConfigParser
|
||||
import PyPAD
|
||||
|
||||
def eprint(*args,**kwargs):
|
||||
print(*args,file=sys.stderr,**kwargs)
|
||||
#def eprint(*args,**kwargs):
|
||||
# print(*args,file=sys.stderr,**kwargs)
|
||||
|
||||
def processUpdate(update,section):
|
||||
if config.get(section,'ProcessNullUpdates')=='0':
|
||||
@ -60,7 +60,7 @@ def ProcessPad(update):
|
||||
try:
|
||||
if processUpdate(update,section):
|
||||
fmtstr=config.get(section,'FormatString')
|
||||
send_sock.sendto(update.resolvePadFields(fmtstr,int(config.get(section,'Encoding'))),
|
||||
send_sock.sendto(update.resolvePadFields(fmtstr,int(config.get(section,'Encoding'))).encode('utf-8'),
|
||||
(config.get(section,'IpAddress'),int(config.get(section,'UdpPort'))))
|
||||
n=n+1
|
||||
except ConfigParser.NoSectionError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user