From 7d3a6791355d9810c9128fa39a0af1c943d92362 Mon Sep 17 00:00:00 2001 From: vakaris_zilius Date: Fri, 1 Apr 2022 10:54:53 +0000 Subject: [PATCH] Agent: Fix error handling in modify_shell_startup_files.py --- .../post_breach/actions/modify_shell_startup_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py b/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py index b6fd9e601..21d5d4372 100644 --- a/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py +++ b/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py @@ -84,6 +84,6 @@ class ModifyShellStartupFiles(PBA): return output, True except subprocess.CalledProcessError as err: # Return error output of the command - return err.output.decode(), False + return str(err), False except subprocess.TimeoutExpired as err: - return err.output.decode(), False + return str(err), False