Skip to content

Commit ee328d5

Browse files
committed
bobbit.modules.rpcs: communicate already does a wait
1 parent 76801d2 commit ee328d5

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/bobbit/modules/rpcs.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ async def execute(bot, message, command):
5858
RPC_TIMESTAMP = time.time()
5959
return message.with_body(random.choice(DENIALS))
6060

61-
command = shlex.split(command) if isinstance(command, str) else command
62-
process = await asyncio.create_subprocess_exec(*command, stdout=asyncio.subprocess.PIPE)
63-
61+
command = shlex.split(command) if isinstance(command, str) else command
62+
process = await asyncio.create_subprocess_exec(*command, stdout=asyncio.subprocess.PIPE)
6463
stdout, _ = await process.communicate()
65-
await process.wait()
66-
RPC_TIMESTAMP = time.time()
64+
65+
RPC_TIMESTAMP = time.time()
6766
return stdout.decode().splitlines()
6867

6968
async def rpc(bot, message, program=None, arguments=None):

0 commit comments

Comments
 (0)