mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Added fallback for parse_error(string) on elasticsearch_plugin module. (#2517)
This commit is contained in:
parent
2dda9d3343
commit
73b95ab853
1 changed files with 4 additions and 1 deletions
|
@ -118,7 +118,10 @@ def is_plugin_present(plugin_dir, working_dir):
|
||||||
|
|
||||||
def parse_error(string):
|
def parse_error(string):
|
||||||
reason = "reason: "
|
reason = "reason: "
|
||||||
|
try:
|
||||||
return string[string.index(reason) + len(reason):].strip()
|
return string[string.index(reason) + len(reason):].strip()
|
||||||
|
except ValueError:
|
||||||
|
return string
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue