ソースを参照

mesh: handle no-data-in-BATCAVE case

Helge Jung 9 年 前
コミット
9605a194d6
1 ファイル変更4 行追加0 行削除
  1. 4 0
      modules/ffpb.py

+ 4 - 0
modules/ffpb.py

@@ -796,6 +796,10 @@ def ffpb_nodemesh(bot, trigger):
 
     # query BATCAVE for node's neighbours (result is a list of MAC addresses)
     cave_result = ffpb_get_batcave_nodefield(nodeid, 'neighbours')
+    if cave_result is None:
+        msg = 'Hm, scheinbar liegen zu \'{0}\' keine Daten vor. Klingt komisch, ist aber so.'
+        bot.say(msg.format(node['hostname'] if 'hostname' in node else target_name))
+        return
 
     # query BATCAVE for neighbour's names
     data = '&'.join([str(n) for n in cave_result])