mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
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.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user