comparison sat/core/sat_main.py @ 2990:6959c71ab8bf

plugin XEP-0045: log "failure" on configure error
author Goffi <goffi@goffi.org>
date Sat, 06 Jul 2019 15:51:48 +0200
parents 06f30ad8e110
children ab2696e34d29
comparison
equal deleted inserted replaced
2989:c13333fcde5e 2990:6959c71ab8bf
594 @param name: name of the option 594 @param name: name of the option
595 @return: unicode representation of the option 595 @return: unicode representation of the option
596 """ 596 """
597 return unicode(self.memory.getConfig(section, name, "")) 597 return unicode(self.memory.getConfig(section, name, ""))
598 598
599 def logErrback(self, failure_): 599 def logErrback(self, failure_, msg=_(u"Unexpected error: {failure_}")):
600 """generic errback logging 600 """Generic errback logging
601 601
602 @param msg(unicode): error message ("failure_" key will be use for format)
602 can be used as last errback to show unexpected error 603 can be used as last errback to show unexpected error
603 """ 604 """
604 log.error(_(u"Unexpected error: {}".format(failure_))) 605 log.error(msg.format(failure_=failure_))
605 return failure_ 606 return failure_
606 607
607 #  namespaces 608 #  namespaces
608 609
609 def registerNamespace(self, short_name, namespace): 610 def registerNamespace(self, short_name, namespace):