monitoring-plugins-sar-perf/no-python2.patch
Dominique Leuenberger caf477d719 - Fix version number, we don't want to downgrade this package.
- Conversion to _service pulled source from upstream
- Add no-python2.patch to make script python3 compatible

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=42
2025-01-27 11:55:31 +00:00

35 lines
1.2 KiB
Diff

---
check_sar_perf.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/check_sar_perf.py
+++ b/check_sar_perf.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2010, Nick Anderson <nick@cmdln.org>
# All rights reserved.
@@ -121,10 +121,10 @@ def CheckBin(program):
def Main(args):
# Ensure a profile (aka myOpts) is selected
if not len(args) > 1:
- print 'ERROR: no profile selected'
+ print('ERROR: no profile selected')
sys.exit(ERR_UNKN)
if not CheckBin('sar'):
- print 'ERROR: sar not found on PATH (%s), install sysstat' %os.environ['PATH']
+ print('ERROR: sar not found on PATH (%s), install sysstat' %os.environ['PATH'])
sys.exit(ERR_CRIT)
# Profiles may need to be modified for different versions of the sysstat package
@@ -148,7 +148,7 @@ def Main(args):
if len(args) > 2:
sar = SarNRPE(myOpts[args[1]],args[2])
else:
- print 'ERROR: no device specified'
+ print('ERROR: no device specified')
sys.exit(ERR_UNKN)
else:
sar = SarNRPE(myOpts[args[1]])