Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue