Skip to content

Commit 1da262a

Browse files
committed
fix(ntp-*): prevent TypeError: ''=' not supported between instances of 'int' and 'str'
1 parent e2370f9 commit 1da262a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Monitoring Plugins:
3434
* about-me: error in perfdata if using `--dmidecode` and there is no HW information
3535
* about-me: fix various errors with `sys_dimensions` on some machines
3636
* by-ssh: add missing `--verbose` parameter
37+
* ntp-*: prevent `TypeError: ''=' not supported between instances of 'int' and 'str'`
3738

3839

3940
### Changed ("refactor", "chore" etc.)

check-plugins/ntp-ntpd/ntp-ntpd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import lib.shell
2222
from lib.globals import (STATE_OK, STATE_UNKNOWN, STATE_WARN)
2323

2424
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
25-
__version__ = '2025100601'
25+
__version__ = '2025120201'
2626

2727
DESCRIPTION = '''This plugin checks the clock offset of ntpd in milliseconds
2828
compared to ntp servers.'''
@@ -56,6 +56,7 @@ def parse_args():
5656
help=lib.args.help('--stratum') + ' '
5757
+ 'Default: %(default)s',
5858
dest='STRATUM',
59+
type=int,
5960
default=DEFAULT_STRATUM,
6061
)
6162

check-plugins/ntp-systemd-timesyncd/ntp-systemd-timesyncd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import lib.shell
2121
from lib.globals import (STATE_OK, STATE_UNKNOWN, STATE_WARN)
2222

2323
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
24-
__version__ = '2025100601'
24+
__version__ = '2025120201'
2525

2626
DESCRIPTION = '''This plugin checks the state of systemd-timesyncd.'''
2727

@@ -44,6 +44,7 @@ def parse_args():
4444
help=lib.args.help('--stratum') + ' '
4545
+ 'Default: %(default)s',
4646
dest='STRATUM',
47+
type=int,
4748
default=DEFAULT_STRATUM,
4849
)
4950

check-plugins/ntp-w32tm/ntp-w32tm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import lib.txt
2323
from lib.globals import (STATE_OK, STATE_UNKNOWN, STATE_WARN)
2424

2525
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
26-
__version__ = '2025100601'
26+
__version__ = '2025120201'
2727

2828
DESCRIPTION = '''This monitoring plugin runs `w32tm /query /status /verbose` (Windows)
2929
to help diagnose problems with the time settings.'''
@@ -58,6 +58,7 @@ def parse_args():
5858
help=lib.args.help('--stratum') + ' '
5959
+ 'Default: %(default)s',
6060
dest='STRATUM',
61+
type=int,
6162
default=DEFAULT_STRATUM,
6263
)
6364

0 commit comments

Comments
 (0)