From 73b95ab853395414547dfc3aa9cb777ddf628e0a Mon Sep 17 00:00:00 2001 From: Shinichi TAMURA Date: Wed, 6 Jul 2016 14:20:23 +0900 Subject: [PATCH] Added fallback for parse_error(string) on elasticsearch_plugin module. (#2517) --- lib/ansible/modules/extras/packaging/elasticsearch_plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/packaging/elasticsearch_plugin.py b/lib/ansible/modules/extras/packaging/elasticsearch_plugin.py index 25b49e2c93..e352f71758 100644 --- a/lib/ansible/modules/extras/packaging/elasticsearch_plugin.py +++ b/lib/ansible/modules/extras/packaging/elasticsearch_plugin.py @@ -118,7 +118,10 @@ def is_plugin_present(plugin_dir, working_dir): def parse_error(string): reason = "reason: " - return string[string.index(reason) + len(reason):].strip() + try: + return string[string.index(reason) + len(reason):].strip() + except ValueError: + return string def main():