From 346ec3ce3c0488142845ad052409ca57d632bc54 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) --- packaging/elasticsearch_plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/elasticsearch_plugin.py b/packaging/elasticsearch_plugin.py index 02fc674de1c..7472c033158 100644 --- a/packaging/elasticsearch_plugin.py +++ b/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():