From 664fbc9d2083e5be1bbdfcb8654a6781e79af99a Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 27 Oct 2009 13:25:55 -0400
Subject: [PATCH] Remove exceptions list from GenerateUniqueID

It's not used anywhere, so it's dead code.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/config.py | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/lib/config.py b/lib/config.py
index 2fea52365..6860569e2 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -177,24 +177,17 @@ class ConfigWriter:
     existing.update([i.uuid for i in self._AllUUIDObjects() if i.uuid])
     return existing
 
-  def _GenerateUniqueID(self, exceptions=None):
+  def _GenerateUniqueID(self):
     """Generate an unique UUID.
 
     This checks the current node, instances and disk names for
     duplicates.
 
-    @param exceptions: a list with some other names which should be
-        checked for uniqueness (used for example when you want to get
-        more than one id at one time without adding each one in turn
-        to the config file)
-
     @rtype: string
     @return: the unique id
 
     """
     existing = self._AllIDs(include_temporary=True)
-    if exceptions is not None:
-      existing.update(exceptions)
     retries = 64
     while retries > 0:
       unique_id = utils.NewUUID()
@@ -207,13 +200,13 @@ class ConfigWriter:
     return unique_id
 
   @locking.ssynchronized(_config_lock, shared=1)
-  def GenerateUniqueID(self, exceptions=None):
+  def GenerateUniqueID(self):
     """Generate an unique ID.
 
     This is just a wrapper over the unlocked version.
 
     """
-    return self._GenerateUniqueID(exceptions=exceptions)
+    return self._GenerateUniqueID()
 
   def _CleanupTemporaryIDs(self):
     """Cleanups the _temporary_ids structure.
-- 
GitLab