Browse Source

netstatus: handle "no data" scenario

Helge Jung 9 years ago
parent
commit
a7258bea19
1 changed files with 4 additions and 1 deletions
  1. 4 1
      modules/ffpb_netstatus.py

+ 4 - 1
modules/ffpb_netstatus.py

@@ -49,7 +49,7 @@ def ffpb_get_stats(bot):
 
     status = __batcave.get_status()
     if status is None:
-        bot.say('Yikes, offenbar ist das allwissende Auge gerade schlafen.')
+        print('Failed to fetch BATCAVE status.')
         return
 
     bot.memory['ffpb_stats'] = status
@@ -132,6 +132,9 @@ def ffpb_rolloutstatus(bot, trigger):
         return
 
     nodes = __batcave.get_nodes()
+    if nodes is None:
+        bot.reply('Hmpf, ich kriege gerade keine Infos. Das ist doch Mist so.')
+        return
 
     # check each node in ALFRED data
     for item in nodes: