OSDN Git Service

and so on
authoryamat0jp <yamat0jp@yahoo.co.jp>
Tue, 11 Sep 2018 21:32:38 +0000 (06:32 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Tue, 11 Sep 2018 21:32:38 +0000 (06:32 +0900)
bot.py

diff --git a/bot.py b/bot.py
index 5f872b8..e1a8d69 100644 (file)
--- a/bot.py
+++ b/bot.py
@@ -117,10 +117,10 @@ class DummyHandler(tornado.web.RequestHandler):
             return
         item = []
         for x in data.split('\n'):
-            if x[0] == '@':
+            if len(x) > 0 and x[0] == '@':
                 dic = {}
                 dic['name'] = x[1:]
-            else:
+            elif 'name' in dic.keys():
                 dic['no'] = x
                 item.append(dic)
         table = self.db[name]