From 7cebbec15535d3539ff63eadf1497c4c9a895423 Mon Sep 17 00:00:00 2001 From: Adrien Banlin Date: Mon, 12 Jun 2023 10:36:00 +0200 Subject: [PATCH] ifupdown.utils: fix itf range in argument ifquery excluded the last digit of interfaces range given. ex: eth[1-2] would give only eth1 instead of eth1 + eth2. This commit fix this behavior by increasing the range in expand_iface_range. --- ifupdown2/ifupdown/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifupdown2/ifupdown/utils.py b/ifupdown2/ifupdown/utils.py index 1af7e0f..0d0732b 100644 --- a/ifupdown2/ifupdown/utils.py +++ b/ifupdown2/ifupdown/utils.py @@ -261,7 +261,7 @@ class utils(): return [] prefix, start, end = ifrange[0], ifrange[1], ifrange[2] suffix = '' if len(ifrange) <= 3 else ifrange[3] - return [f'{prefix}{i}{suffix}' for i in range(start, end)] + return [f'{prefix}{i}{suffix}' for i in range(start, end + 1)] @classmethod def is_ifname_range(cls, name):