Browse Source

[2225_statistics] set methods in Counter

Naoki Kambe 12 years ago
parent
commit
23818a5f2f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/lib/python/isc/statistics/counter.py

+ 3 - 2
src/lib/python/isc/statistics/counter.py

@@ -89,8 +89,9 @@ def init(spec_file_name):
         return _COUNTER
     # create an instance once
     _COUNTER = _Counter(module_spec)
-    # make globals
-    globals().update(_COUNTER._to_global)
+    # set methods in Counter
+    for (k, v) in _COUNTER._to_global.items():
+        setattr(Counter, k, v)
     return _COUNTER
 
 # static internal functions