Skip to content

Commit

Permalink
Fix shinken-monitoring#69: UTF8 encoding for external commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric MOHIER authored and lermit committed Nov 25, 2014
1 parent f314149 commit 52d2de4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion module/plugins/action/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# We will need external commands here
import time
from shinken.external_command import ExternalCommand, ExternalCommandManager
from shinken.log import logger
import re


Expand Down Expand Up @@ -108,7 +109,10 @@ def get_page(cmd=None):
print "Got after macro expansion", extcmd

# Ok, if good, we can launch the command
extcmd = extcmd.decode('utf8', 'replace')
# extcmd = extcmd.decode('utf8', 'replace')
# Fix #69
extcmd = extcmd.decode('utf8', 'ignore')
logger.debug("WebUI plugin 'action', external command: %s." % (extcmd))
e = ExternalCommand(extcmd)
print "Creating the command", e.__dict__
app.push_external_command(e)
Expand Down

0 comments on commit 52d2de4

Please sign in to comment.