Skip to content

Commit 17a052f

Browse files
committed
update yum hook
1 parent d7c239c commit 17a052f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hooks/yum/patchman.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2013-2016 Marcus Furlong <furlongm@gmail.com>
1+
# Copyright 2013-2026 Marcus Furlong <furlongm@gmail.com>
22
#
33
# This file is part of Patchman.
44
#
@@ -23,10 +23,12 @@
2323

2424

2525
def posttrans_hook(conduit):
26-
conduit.info(2, 'Sending report to patchman server...')
2726
servicecmd = conduit.confString('main',
2827
'servicecmd',
2928
'/usr/sbin/patchman-client')
29+
if not os.path.isfile(servicecmd) or not os.access(servicecmd, os.X_OK):
30+
return
31+
conduit.info(2, 'Sending report to patchman server...')
3032
args = '-n'
31-
command = f'{servicecmd} {args}> /dev/null'
33+
command = f'{servicecmd} {args} > /dev/null'
3234
os.system(command)

0 commit comments

Comments
 (0)