Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SpEcHiDe authored Feb 22, 2022
1 parent 7aa7ea6 commit 2446b59
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions publicleechgroup/helper_funcs/run_shell_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ async def run_command(shell_command: List) -> (str, str):
)
# Wait for the subprocess to finish
stdout, stderr = await process.communicate()
e_response = stderr.decode().strip()
t_response = stdout.decode().strip()
try:
e_response = stderr.decode().strip()
except:
e_response = None
try:
t_response = stdout.decode().strip()
except:
t_response = None
return t_response, e_response

0 comments on commit 2446b59

Please sign in to comment.