From 3c7f6c44fba04aeb6db40e3e371d52ca34383cef Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Sun, 14 Dec 2008 12:05:30 +0000
Subject: [PATCH] cleanup: ConfigWriter, initialize all attributes

We should initialized the _last_cluster_serial in the constructor too (just to
be consistent).

Reviewed-by: amishchenko
---
 lib/config.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/config.py b/lib/config.py
index b1661fd87..5fd410be8 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -84,6 +84,7 @@ class ConfigWriter:
     # better to raise an error before starting to modify the config
     # file than after it was modified
     self._my_hostname = utils.HostInfo().name
+    self._last_cluster_serial = -1
     self._OpenConfig()
 
   # this method needs to be static, so that we can call it on the class
@@ -886,7 +887,7 @@ class ConfigWriter:
       raise errors.ConfigurationError("Incomplete configuration"
                                       " (missing cluster.rsahostkeypub)")
     self._config_data = data
-    # init the last serial as -1 so that the next write will cause
+    # reset the last serial as -1 so that the next write will cause
     # ssconf update
     self._last_cluster_serial = -1
 
-- 
GitLab