From b194b66414eeeccca6f495378f08c20ea48abc72 Mon Sep 17 00:00:00 2001
From: Anael Beutot <anael.beutot@smartjog.com>
Date: Tue, 11 Dec 2012 16:42:00 +0100
Subject: [PATCH] Fix uncaught exceptions when unpickling plugins file

---
 cloudcontrol/node/host/__init__.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cloudcontrol/node/host/__init__.py b/cloudcontrol/node/host/__init__.py
index 05e94db..7a57160 100644
--- a/cloudcontrol/node/host/__init__.py
+++ b/cloudcontrol/node/host/__init__.py
@@ -243,7 +243,13 @@ class Handler(BasePlugin):
             except EnvironmentError as exc:
                 logger.error('Cannot load previous plugins: %s (%s)',
                              exc.errno, exc.strerror)
-            except pickle.UnpicklingError as exc:
+            except (
+                EOFError,
+                AttributeError,
+                ImportError,
+                IndexError,
+                pickle.UnpicklingError,
+            ) as exc:
                 logger.error('Cannot read file, bad format, %s', exc)
             else:
                 def plugins_install():
-- 
GitLab