From ae7526dd96558c0b04db8ba8f587fa6358bdddfe Mon Sep 17 00:00:00 2001 From: nemunaire Date: Sun, 10 May 2015 04:12:30 +0200 Subject: [PATCH] Fix double exception when invalid file descriptor found in select --- nemubot/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nemubot/bot.py b/nemubot/bot.py index 41f619b..6e6f27c 100644 --- a/nemubot/bot.py +++ b/nemubot/bot.py @@ -149,17 +149,17 @@ class Bot(threading.Thread): for r in _rlist: if not hasattr(r, "fileno") or not isinstance(r.fileno(), int) or r.fileno() < 0: _rlist.remove(r) - logger.error("Found invalid object in _rlist: " + r) + logger.error("Found invalid object in _rlist: " + str(r)) fnd_smth = True for w in _wlist: if not hasattr(w, "fileno") or not isinstance(w.fileno(), int) or w.fileno() < 0: _wlist.remove(w) - logger.error("Found invalid object in _wlist: " + w) + logger.error("Found invalid object in _wlist: " + str(w)) fnd_smth = True for x in _xlist: if not hasattr(x, "fileno") or not isinstance(x.fileno(), int) or x.fileno() < 0: _xlist.remove(x) - logger.error("Found invalid object in _xlist: " + x) + logger.error("Found invalid object in _xlist: " + str(x)) fnd_smth = True if not fnd_smth: logger.exception("Can't continue, sorry")