fix warnings
This commit is contained in:
parent
226f7556ce
commit
b48d3c8ad9
4 changed files with 4 additions and 6 deletions
|
|
@ -50,7 +50,6 @@ class ConfServer:
|
||||||
|
|
||||||
def confserver_app(self):
|
def confserver_app(self):
|
||||||
self.app = web.Application(
|
self.app = web.Application(
|
||||||
loop=asyncio.get_event_loop(),
|
|
||||||
middlewares=[
|
middlewares=[
|
||||||
self.log_all_requests,
|
self.log_all_requests,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,7 @@ class portal_api_lg(plugins.ConfServerApp):
|
||||||
logs = []
|
logs = []
|
||||||
logsroot = ET.fromstring(retcmd["resp"])
|
logsroot = ET.fromstring(retcmd["resp"])
|
||||||
if logsroot.attrib["ret"] == "ok":
|
if logsroot.attrib["ret"] == "ok":
|
||||||
cleanlogs = logsroot.getchildren()
|
for l in logsroot:
|
||||||
for l in cleanlogs:
|
|
||||||
cleanlog = {
|
cleanlog = {
|
||||||
"ts": l.attrib["s"],
|
"ts": l.attrib["s"],
|
||||||
"area": l.attrib["a"],
|
"area": l.attrib["a"],
|
||||||
|
|
|
||||||
|
|
@ -570,8 +570,8 @@ class XMPPAsyncClient:
|
||||||
if client:
|
if client:
|
||||||
bumper.client_set_xmpp(client["resource"], True)
|
bumper.client_set_xmpp(client["resource"], True)
|
||||||
|
|
||||||
clientbindxml = xml.getchildren()
|
clientbindxml = list(xml)
|
||||||
clientresourcexml = clientbindxml[0].getchildren()
|
clientresourcexml = list(clientbindxml[0])
|
||||||
if self.devclass: # its a bot
|
if self.devclass: # its a bot
|
||||||
self.name = f"XMPP_Client_{self.uid}_{self.devclass}"
|
self.name = f"XMPP_Client_{self.uid}_{self.devclass}"
|
||||||
self.bumper_jid = "{}@{}.ecorobot.net/atom".format(
|
self.bumper_jid = "{}@{}.ecorobot.net/atom".format(
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ async def test_confserver_exceptions():
|
||||||
async def test_confserver_no_ssl():
|
async def test_confserver_no_ssl():
|
||||||
conf_server = bumper.ConfServer((HOST, 111111), usessl=False)
|
conf_server = bumper.ConfServer((HOST, 111111), usessl=False)
|
||||||
conf_server.confserver_app()
|
conf_server.confserver_app()
|
||||||
asyncio.create_task(conf_server.start_server())
|
await conf_server.start_server()
|
||||||
|
|
||||||
|
|
||||||
def test_get_milli_time():
|
def test_get_milli_time():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue