]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2225_statistics] put _COUNTER inside of the class scope
authorNaoki Kambe <kambe@jprs.co.jp>
Tue, 27 Nov 2012 06:57:34 +0000 (15:57 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Tue, 27 Nov 2012 07:37:44 +0000 (16:37 +0900)
src/lib/python/isc/statistics/counter.py

index 565454259d6be7e38aa8972cf0cef688c07c519e..83d94d009959182c517537a3700a76a73cf66e3f 100644 (file)
@@ -73,9 +73,6 @@ import threading
 import isc.config
 from datetime import datetime
 
-# container of a counter object
-_COUNTER = None
-
 # static internal functions
 def _add_counter(element, spec, identifier):
     """Returns value of the identifier if the identifier is in the
@@ -144,6 +141,8 @@ def _stop_timer(start_time, element, spec, identifier):
 
 class Counter():
     """A counter class"""
+    # container of a counter object
+    _COUNTER = None
     def init(spec_file_name):
         """A creator method for a counter class. It creates a counter
         object by the module name of the given spec file. An argument is a