From: Michal 'vorner' Vaner Date: Tue, 19 Feb 2013 09:59:46 +0000 (+0100) Subject: [2676] Translate to the correct exception X-Git-Tag: bind10-1.1.0beta1-release~83^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d5d7d6e423cb6e46a9f4acfde4e8ebf434951d2;p=thirdparty%2Fkea.git [2676] Translate to the correct exception If the remote is not there, it's not "Data error" --- diff --git a/src/bin/stats/stats_httpd.py.in b/src/bin/stats/stats_httpd.py.in index f42b1d1a44..fd9ac93088 100755 --- a/src/bin/stats/stats_httpd.py.in +++ b/src/bin/stats/stats_httpd.py.in @@ -460,12 +460,13 @@ class StatsHttpd: param['name'] = name try: return self.mccs.rpc_call('show', 'Stats', params=param) - except isc.config.RPCError as e: - raise StatsHttpdDataError("Stats module: %s" % str(e)) except (isc.cc.session.SessionTimeout, - isc.cc.session.SessionError) as err: + isc.cc.session.SessionError, + isc.config.RPCRecipientMissing) as err: raise StatsHttpdError("%s: %s" % (err.__class__.__name__, err)) + except isc.config.RPCError as e: + raise StatsHttpdDataError("Stats module: %s" % str(e)) def get_stats_spec(self, owner=None, name=None): """Requests statistics data to the Stats daemon and returns