check_bandwidth: fix icinga2 merging args
This commit is contained in:
parent
6fdc67eb43
commit
f021c8cddd
|
@ -19,6 +19,10 @@ parser.add_argument('--ignore', nargs='*', default=[], help='Interface names to
|
|||
parser.add_argument('--ignore-re', default=None, help='Regex matching interface names to ignore.')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Icinga2 will merge the args to one string
|
||||
if len(args.ignore) == 1:
|
||||
args.ignore = args.ignore[0].split(' ')
|
||||
|
||||
if args.ignore_re:
|
||||
ignore_re = re.compile(args.ignore_re)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue