jp: jp asyncio port:
/!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\ This patch implements the port of jp to asyncio, so it is now correctly using the bridge asynchronously, and it can be used with bridges like `pb`. This also simplify the code, notably for things which were previously implemented with many callbacks (like pagination with RSM). During the process, some behaviours have been modified/fixed, in jp and backends, check diff for details.
This commit is contained in:
parent
5cee4fbab7
commit
76aadbb3fb
1 changed files with 3299 additions and 3300 deletions
|
|
@ -20,11 +20,11 @@
|
|||
from sat.core.i18n import _
|
||||
from sat.core.constants import Const as C
|
||||
from sat.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
from twisted.words.xish import domish
|
||||
from functools import partial
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
||||
PLUGIN_INFO = {
|
||||
C.PI_NAME: "Raw XML log Plugin",
|
||||
C.PI_IMPORT_NAME: "XmlLog",
|
||||
|
|
@ -74,9 +74,9 @@ class XmlLog(object):
|
|||
|
||||
def onSend(self, obj, client):
|
||||
if isinstance(obj, str):
|
||||
log = str(obj)
|
||||
xml_log = obj
|
||||
elif isinstance(obj, domish.Element):
|
||||
log = obj.toXml()
|
||||
xml_log = obj.toXml()
|
||||
else:
|
||||
log.error(_("INTERNAL ERROR: Unmanaged XML type"))
|
||||
self.host.bridge.xmlLog("OUT", log, client.profile)
|
||||
self.host.bridge.xmlLog("OUT", xml_log, client.profile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue