Skip to content

Commit

Permalink
More precise version match (ansible-collections#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrimee committed Mar 22, 2023
1 parent 01a0632 commit 5f0caeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/module_utils/routeros.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ def to_commands(module, commands):

def should_add_leading_space(module):
"""Determines whether adding a leading space to the command is needed
to workaround prompt bug in 6.49 <= ROS <7"""
to workaround prompt bug in 6.49 <= ROS < 7.2"""
capabilities = get_capabilities(module)
network_os_version = capabilities.get('device_info',{}).get('network_os_version')
if network_os_version is None:
return False
version = LooseVersion(network_os_version)
return (version >= LooseVersion('6.49')) and (version < LooseVersion('7'))
return (version >= LooseVersion('6.49')) and (version < LooseVersion('7.2'))

def run_commands(module, commands, check_rc=True):
responses = list()
Expand Down

0 comments on commit 5f0caeb

Please sign in to comment.