Browse Source

[213] Pass as parameter, not modify afterwards

It is cleaner to pass the parameter to parent class constructor than
overwrite the protected member afterwards.
Michal 'vorner' Vaner 13 years ago
parent
commit
65b9917a96
1 changed files with 4 additions and 8 deletions
  1. 4 8
      src/lib/python/isc/bind10/special_component.py

+ 4 - 8
src/lib/python/isc/bind10/special_component.py

@@ -58,27 +58,23 @@ class Msgq(Component):
 
 
 class CfgMgr(Component):
 class CfgMgr(Component):
     def __init__(self, process, boss, kind, address=None, params=None):
     def __init__(self, process, boss, kind, address=None, params=None):
-        Component.__init__(self, process, boss, kind)
+        Component.__init__(self, process, boss, kind, 'ConfigManager')
         self._start_func = boss.start_cfgmgr
         self._start_func = boss.start_cfgmgr
-        self._address = 'ConfigManager'
 
 
 class Auth(Component):
 class Auth(Component):
     def __init__(self, process, boss, kind, address=None, params=None):
     def __init__(self, process, boss, kind, address=None, params=None):
-        Component.__init__(self, process, boss, kind)
+        Component.__init__(self, process, boss, kind, 'Auth')
         self._start_func = boss.start_auth
         self._start_func = boss.start_auth
-        self._address = 'Auth'
 
 
 class Resolver(Component):
 class Resolver(Component):
     def __init__(self, process, boss, kind, address=None, params=None):
     def __init__(self, process, boss, kind, address=None, params=None):
-        Component.__init__(self, process, boss, kind)
+        Component.__init__(self, process, boss, kind, 'Resolver')
         self._start_func = boss.start_resolver
         self._start_func = boss.start_resolver
-        self._address = 'Resolver'
 
 
 class CmdCtl(Component):
 class CmdCtl(Component):
     def __init__(self, process, boss, kind, address=None, params=None):
     def __init__(self, process, boss, kind, address=None, params=None):
-        Component.__init__(self, process, boss, kind)
+        Component.__init__(self, process, boss, kind, 'Cmdctl')
         self._start_func = boss.start_cmdctl
         self._start_func = boss.start_cmdctl
-        self._address = 'Cmdctl'
 
 
 def get_specials():
 def get_specials():
     """
     """