be sure that the provided server url ends with / for future concat
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
f77ab3348c
commit
cab6e738aa
|
@ -255,8 +255,13 @@ def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
domain = pyunycode.convert(args.domain)
|
domain = pyunycode.convert(args.domain)
|
||||||
|
# be sure that the provided server url ends with / for future concat
|
||||||
|
if (isinstance(args.server, str) and args.server[-1] != '/'):
|
||||||
|
server = args.server + '/'
|
||||||
|
else:
|
||||||
|
server = args.server
|
||||||
check = nagiosplugin.Check(
|
check = nagiosplugin.Check(
|
||||||
Expiration(domain, args.server),
|
Expiration(domain, server),
|
||||||
nagiosplugin.ScalarContext(
|
nagiosplugin.ScalarContext(
|
||||||
'daystoexpiration',
|
'daystoexpiration',
|
||||||
warning=wrange,
|
warning=wrange,
|
||||||
|
|
Loading…
Reference in a new issue