From 8b3345bd961c7a0421cdfb4cf606a50f6e00d5c5 Mon Sep 17 00:00:00 2001 From: Marcus Furlong Date: Thu, 5 Mar 2026 20:45:23 -0500 Subject: [PATCH] update yum hook --- hooks/yum/patchman.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hooks/yum/patchman.py b/hooks/yum/patchman.py index 52f9cc8b..9ae55d90 100644 --- a/hooks/yum/patchman.py +++ b/hooks/yum/patchman.py @@ -1,4 +1,4 @@ -# Copyright 2013-2016 Marcus Furlong +# Copyright 2013-2026 Marcus Furlong # # This file is part of Patchman. # @@ -23,10 +23,12 @@ def posttrans_hook(conduit): - conduit.info(2, 'Sending report to patchman server...') servicecmd = conduit.confString('main', 'servicecmd', '/usr/sbin/patchman-client') + if not os.path.isfile(servicecmd) or not os.access(servicecmd, os.X_OK): + return + conduit.info(2, 'Sending report to patchman server...') args = '-n' - command = f'{servicecmd} {args}> /dev/null' + command = f'{servicecmd} {args} > /dev/null' os.system(command)