Browse Source

[1288] a bit of cleanup: removed unnecessary escapes and an unsed variable.

JINMEI Tatuya 13 years ago
parent
commit
d9319841c5
2 changed files with 5 additions and 5 deletions
  1. 3 3
      src/bin/xfrout/xfrout.py.in
  2. 2 2
      src/lib/python/isc/notify/notify_out.py

+ 3 - 3
src/bin/xfrout/xfrout.py.in

@@ -260,12 +260,12 @@ class XfroutSession():
         # We should eventually take into account the RR class here.
         # We should eventually take into account the RR class here.
         # For now, we  hardcode a particular type (SQLite3-based), and only
         # For now, we  hardcode a particular type (SQLite3-based), and only
         # consider that one.
         # consider that one.
-        datasrc_config = '{ \"database_file\": \"' + \
-            self._server.get_db_file() + '\"}'
+        datasrc_config = '{ "database_file": "' + \
+            self._server.get_db_file() + '"}'
         self._datasrc_client = self.ClientClass('sqlite3', datasrc_config)
         self._datasrc_client = self.ClientClass('sqlite3', datasrc_config)
         try:
         try:
             self._iterator = self._datasrc_client.get_iterator(zone_name)
             self._iterator = self._datasrc_client.get_iterator(zone_name)
-        except isc.datasrc.Error as error:
+        except isc.datasrc.Error:
             # If the current name server does not have authority for the
             # If the current name server does not have authority for the
             # zone, xfrout can't serve for it, return rcode NOTAUTH.
             # zone, xfrout can't serve for it, return rcode NOTAUTH.
             # Note: this exception can happen for other reasons.  We should
             # Note: this exception can happen for other reasons.  We should

+ 2 - 2
src/lib/python/isc/notify/notify_out.py

@@ -256,7 +256,7 @@ class NotifyOut:
         but not correct, it can't handle the delegation slaves, or the CNAME
         but not correct, it can't handle the delegation slaves, or the CNAME
         and DNAME logic.
         and DNAME logic.
         TODO. the function should be provided by one library.'''
         TODO. the function should be provided by one library.'''
-        datasrc_config = '{ \"database_file\": \"' + self._db_file + '\"}'
+        datasrc_config = '{ "database_file": "' + self._db_file + '"}'
         result, finder = DataSourceClient('sqlite3',
         result, finder = DataSourceClient('sqlite3',
                                           datasrc_config).find_zone(zone_name)
                                           datasrc_config).find_zone(zone_name)
         if result is not DataSourceClient.SUCCESS:
         if result is not DataSourceClient.SUCCESS:
@@ -467,7 +467,7 @@ class NotifyOut:
         return msg, qid
         return msg, qid
 
 
     def _get_zone_soa(self, zone_name, zone_class):
     def _get_zone_soa(self, zone_name, zone_class):
-        datasrc_config = '{ \"database_file\": \"' + self._db_file + '\"}'
+        datasrc_config = '{ "database_file": "' + self._db_file + '"}'
         result, finder = DataSourceClient('sqlite3',
         result, finder = DataSourceClient('sqlite3',
                                           datasrc_config).find_zone(zone_name)
                                           datasrc_config).find_zone(zone_name)
         if result is not DataSourceClient.SUCCESS:
         if result is not DataSourceClient.SUCCESS: