From 159d4ec6b636243dce6e251b3b02c9a4d8114246 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 2 Nov 2009 12:52:49 +0100
Subject: [PATCH] Remove the OpRetryError exception

This is only used in two places, in an error path that is no longer
valid since Ganeti 2.0. We remove the try..except since we should not
get it anymore (and if we do, then we should catch it in all
config.Update cases) and we remove the exception class completely.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/cmdlib.py | 14 ++------------
 lib/errors.py |  6 ------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index c2187eb56..552cc24ac 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -8109,12 +8109,7 @@ class LUAddTags(TagsLU):
         self.target.AddTag(tag)
     except errors.TagError, err:
       raise errors.OpExecError("Error while setting tag: %s" % str(err))
-    try:
-      self.cfg.Update(self.target, feedback_fn)
-    except errors.ConfigurationError:
-      raise errors.OpRetryError("There has been a modification to the"
-                                " config file and the operation has been"
-                                " aborted. Please retry.")
+    self.cfg.Update(self.target, feedback_fn)
 
 
 class LUDelTags(TagsLU):
@@ -8148,12 +8143,7 @@ class LUDelTags(TagsLU):
     """
     for tag in self.op.tags:
       self.target.RemoveTag(tag)
-    try:
-      self.cfg.Update(self.target, feedback_fn)
-    except errors.ConfigurationError:
-      raise errors.OpRetryError("There has been a modification to the"
-                                " config file and the operation has been"
-                                " aborted. Please retry.")
+    self.cfg.Update(self.target, feedback_fn)
 
 
 class LUTestDelay(NoHooksLU):
diff --git a/lib/errors.py b/lib/errors.py
index 9fd9868e6..40a0ae7d8 100644
--- a/lib/errors.py
+++ b/lib/errors.py
@@ -134,12 +134,6 @@ class OpExecError(GenericError):
   """
 
 
-class OpRetryError(OpExecError):
-  """Error during OpCode execution, action can be retried.
-
-  """
-
-
 class OpCodeUnknown(GenericError):
   """Unknown opcode submitted.
 
-- 
GitLab