Browse Source

[1457] refactor: don't return tuple from __get_update_zone()

Jelte Jansen 13 years ago
parent
commit
61977ad7fa
1 changed files with 9 additions and 10 deletions
  1. 9 10
      src/lib/python/isc/ddns/session.py

+ 9 - 10
src/lib/python/isc/ddns/session.py

@@ -181,7 +181,7 @@ class UpdateSession:
 
 
         '''
         '''
         try:
         try:
-            datasrc_client, zname, zclass = self.__get_update_zone()
+            self.__get_update_zone()
             # conceptual code that would follow
             # conceptual code that would follow
             prereq_result = self.__check_prerequisites()
             prereq_result = self.__check_prerequisites()
             if prereq_result != Rcode.NOERROR():
             if prereq_result != Rcode.NOERROR():
@@ -206,14 +206,13 @@ class UpdateSession:
         '''Parse the zone section and find the zone to be updated.
         '''Parse the zone section and find the zone to be updated.
 
 
         If the zone section is valid and the specified zone is found in
         If the zone section is valid and the specified zone is found in
-        the configuration, it returns a tuple of:
+        the configuration, sets private member variables for this session:
-        - A matching data source that contains the specified zone
+        __datasrc_client: A matching data source that contains the specified
-        - The zone name as a Name object
+                          zone
-        - The zone class as an RRClass object
+        __zname: The zone name as a Name object
-
+        __zclass: The zone class as an RRClass object
-        If this method does not raise, these values will also be set to
+        __finder: A ZoneFinder for this zone
-        the session member variables self.__zname, self.__zclass, and
+        If this method raises an exception, these members are not set
-        self.__datasrc_client.
         '''
         '''
         # Validation: the zone section must contain exactly one question,
         # Validation: the zone section must contain exactly one question,
         # and it must be of type SOA.
         # and it must be of type SOA.
@@ -235,7 +234,7 @@ class UpdateSession:
             self.__zclass = zclass
             self.__zclass = zclass
             self.__datasrc_client = datasrc_client
             self.__datasrc_client = datasrc_client
             _, self.__finder = datasrc_client.find_zone(zname)
             _, self.__finder = datasrc_client.find_zone(zname)
-            return datasrc_client, zname, zclass
+            return
         elif zone_type == isc.ddns.zone_config.ZONE_SECONDARY:
         elif zone_type == isc.ddns.zone_config.ZONE_SECONDARY:
             # We are a secondary server; since we don't yet support update
             # We are a secondary server; since we don't yet support update
             # forwarding, we return 'not implemented'.
             # forwarding, we return 'not implemented'.