]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2676] Translate to the correct exception
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 19 Feb 2013 09:59:46 +0000 (10:59 +0100)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 19 Feb 2013 09:59:46 +0000 (10:59 +0100)
If the remote is not there, it's not "Data error"

src/bin/stats/stats_httpd.py.in

index f42b1d1a447aa869c004819b6ddaacb2e7cf1f83..fd9ac930884f17337c1b587c26d0de876e649bbf 100755 (executable)
@@ -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