From: Naoki Kambe Date: Fri, 14 Dec 2012 08:45:47 +0000 (+0900) Subject: [2225_statistics] remove 'else' statement X-Git-Tag: bind10-1.1.0beta1-release~72^2~40^2~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=65bbcd0970063c0923f597ee4413ccbcc969ba58;p=thirdparty%2Fkea.git [2225_statistics] remove 'else' statement In stead of being removed, it just returns if DataNotFoundError is raised. Due to the review comment. --- diff --git a/src/lib/python/isc/statistics/counter.py b/src/lib/python/isc/statistics/counter.py index 65b6a4dd0f..13d454163d 100644 --- a/src/lib/python/isc/statistics/counter.py +++ b/src/lib/python/isc/statistics/counter.py @@ -337,19 +337,18 @@ class Counters(): identifier) except isc.cc.data.DataNotFoundError: # do not set the end time if the timer isn't started - pass - else: - # set the end time - _stop_timer( - start_time, - self._statistics._data, - self._statistics._spec, - identifier) - # delete the started timer - del isc.cc.data.find( - self._start_time, - _concat(*identifier.split('/')[0:-1]))\ - [identifier.split('/')[-1]] + return + # set the end time + _stop_timer( + start_time, + self._statistics._data, + self._statistics._spec, + identifier) + # delete the started timer + del isc.cc.data.find( + self._start_time, + _concat(*identifier.split('/')[0:-1]))\ + [identifier.split('/')[-1]] def dump_statistics(self): """Calculates an entire server counts, and returns statistics