Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/286546

Change subject: udpmxircecho: fix utf-8 encoding issue
......................................................................

udpmxircecho: fix utf-8 encoding issue

When starting this on the new IRC server, it spammed a whole lot

'ascii' codec can't decode byte 0xd0 in position 209: ordinal not in range(128)

and for example the ru.wikipedia channel stayed empty.

This fixes that issue, and makes it output things again.

Bug:T123729
Change-Id: I60a4d2455e8e728b38c7b6a145e28ed24b836d7f
---
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/286546/1

diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index bda431b..df2ff38 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -2,6 +2,9 @@
 #
 # usage: udpmxircecho.py nickname server
 import sys
+reload(sys)
+sys.setdefaultencoding('utf8')
+
 <% if scope.function_os_version(['debian >= jessie']) %>
 from irc.bot import SingleServerIRCBot
 <% else %>

-- 
To view, visit https://gerrit.wikimedia.org/r/286546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60a4d2455e8e728b38c7b6a145e28ed24b836d7f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <dz...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to