From ad8b2f9b43ab684af680cd93b1f64061d49bc051 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Sun, 9 Aug 2009 11:08:40 +0100
Subject: [PATCH] SimpleConfigReader: s/Reload/_Load/

Since we use it also to load the config file initially we rename the
Reload function to _Load. Then we re-export it as Reload to clients
(since for them it's a reload).

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

diff --git a/lib/ssconf.py b/lib/ssconf.py
index c3d37824a..94cab4dab 100644
--- a/lib/ssconf.py
+++ b/lib/ssconf.py
@@ -52,10 +52,10 @@ class SimpleConfigReader(object):
 
     """
     self._file_name = file_name
-    self.Reload()
+    self._Load()
 
-  def Reload(self):
-    """Reloads the config file.
+  def _Load(self):
+    """Loads (or reloads) the config file.
 
     """
     try:
@@ -67,6 +67,10 @@ class SimpleConfigReader(object):
       raise errors.ConfigurationError("Cannot load config file %s: %s" %
                                       (self._file_name, err))
 
+  # Clients can request a reload of the config file, so we export our internal
+  # _Load function as Reload.
+  Reload = _Load
+
   def GetClusterName(self):
     return self._config_data["cluster"]["cluster_name"]
 
-- 
GitLab