Reformatted code base using black.

This commit is contained in:
Goffi 2024-06-19 18:44:57 +02:00
commit 53fdaa9d09

View file

@ -40,12 +40,10 @@ class PipeOut(base.CommandBase):
super(PipeOut, self).__init__(host, "out", help=_("send a pipe a stream"))
def add_parser_options(self):
self.parser.add_argument(
"jid", help=_("the destination jid")
)
self.parser.add_argument("jid", help=_("the destination jid"))
async def start(self):
""" Create named pipe, and send stdin to it """
"""Create named pipe, and send stdin to it"""
try:
port = await self.host.bridge.stream_out(
await self.host.get_full_jid(self.args.jid),
@ -133,7 +131,8 @@ class PipeIn(base.CommandAnswering):
while True:
try:
server = await asyncio.start_server(
partial(handle_stream_in, host=self.host), host, port)
partial(handle_stream_in, host=self.host), host, port
)
except socket.error as e:
if e.errno == errno.EADDRINUSE:
port += 1