Browse Source

[2225_statistics] remove an unnecessary try/expect statement

Due to the review comment.
Naoki Kambe 12 years ago
parent
commit
87ff7feca9
1 changed files with 2 additions and 5 deletions
  1. 2 5
      src/lib/python/isc/statistics/counter.py

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

@@ -81,11 +81,8 @@ def _add_counter(element, spec, identifier):
         return isc.cc.data.find(element, identifier)
     except isc.cc.data.DataNotFoundError:
         pass
-    try:
-        isc.config.find_spec_part(spec, identifier)
-    except isc.cc.data.DataNotFoundError:
-        # spec or identifier is wrong
-        raise
+    # check whether spec and identifier are correct
+    isc.config.find_spec_part(spec, identifier)
     # examine spec of the top-level item first
     spec_ = isc.config.find_spec_part(
         spec, '%s' % identifier.split('/')[0])