plugin text commands: fixed log in genericErrback which was raising an exception when something than StanzaError was received
This commit is contained in:
parent
cf588d3e74
commit
e56883c613
1 changed files with 5 additions and 1 deletions
|
|
@ -210,7 +210,11 @@ class TextCommands(object):
|
|||
raise failure.Failure(exceptions.CancelError())
|
||||
|
||||
def genericErrback(failure):
|
||||
self.feedBack("Command failed with condition '%s'" % failure.value.condition, mess_data, profile)
|
||||
try:
|
||||
msg = u"with condition {}".format(failure.value.condition)
|
||||
except AttributeError:
|
||||
msg = u"with error {}".format(failure.value)
|
||||
self.feedBack(u"Command failed {}".format(msg), mess_data, profile)
|
||||
return False
|
||||
|
||||
mess_data["unparsed"] = msg[1 + len(command):] # part not yet parsed of the message
|
||||
|
|
|
|||
Loading…
Reference in a new issue