Parcourir la source

[2225_statistics] change the default statistics spec in case of a spec file specified in the constructor

Naoki Kambe il y a 12 ans
Parent
commit
9a08bfa493
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      src/lib/python/isc/statistics/counter.py

+ 4 - 0
src/lib/python/isc/statistics/counter.py

@@ -248,6 +248,10 @@ class Counter():
         self._disabled = False
         self._rlock = threading.RLock()
         if not spec_file_name: return
+        # change the default statistics spec
+        self._statistics._spec = \
+            isc.config.module_spec_from_file(spec_file_name).\
+            get_statistics_spec()
         if self._perzone_prefix in \
                 isc.config.spec_name_list(self._statistics_spec):
             self._zones_item_list = isc.config.spec_name_list(