From 48a6348b05f968cf9ddee723195e4b0554c922a3 Mon Sep 17 00:00:00 2001 From: David Coppit Date: Sun, 2 Apr 2017 22:03:36 -0400 Subject: [PATCH] Use subprocess.call for Python 3.4 compatibility --- monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.py b/monitor.py index df0ba85..054b862 100755 --- a/monitor.py +++ b/monitor.py @@ -183,11 +183,11 @@ def run_command(args, event_handler): logging.info("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv") event_handler.enable_monitoring(not args.ignore_events_while_command_is_running) - process = subprocess.run([RUNAS, args.user_id, args.group_id, args.umask, args.command]) + returncode = subprocess.call([RUNAS, args.user_id, args.group_id, args.umask, args.command]) event_handler.enable_monitoring(True) logging.info("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^") - logging.info("Finished running command. Exit code was %i", process.returncode) + logging.info("Finished running command. Exit code was %i", returncode) #-----------------------------------------------------------------------------------------------------------------------