Skip to content

Commit

Permalink
do not log output
Browse files Browse the repository at this point in the history
  • Loading branch information
gawel committed Apr 12, 2023
1 parent b649856 commit e8f8e90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions irc3/plugins/shell_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,13 @@ async def meth(*args, **kwargs):
async def shell_command(self, command, mask, target, args, **kwargs):
env = os.environ.copy()
env['IRC3_COMMAND_ARGS'] = ' '.join(args['<args>'])
self.log.debug('Running command %s' % command)
self.log.debug('Running command: $ %s' % command)
proc = await asyncio.create_subprocess_shell(
command, shell=True, env=env,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT)
await proc.wait()
lines = await proc.stdout.read()
self.log.debug('Running command %s' % lines)
if not isinstance(lines, str):
lines = lines.decode('utf8')
return lines.split('\n')

0 comments on commit e8f8e90

Please sign in to comment.