From eabb163833322170dec192a4757092d2439950d4 Mon Sep 17 00:00:00 2001 From: AZ Huang Date: Mon, 2 Dec 2013 02:00:00 +0800 Subject: [PATCH] Minor fix. --- tox-irc-sync.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tox-irc-sync.py b/tox-irc-sync.py index 80ee9d7..93a21ed 100644 --- a/tox-irc-sync.py +++ b/tox-irc-sync.py @@ -45,15 +45,16 @@ class SyncBot(Tox): checked = False self.joined = False + try: + self.add_friend(GROUP_BOT, "") + except: pass + try: while True: status = self.isconnected() if not checked and status: print('Connected to DHT.') checked = True - try: - self.add_friend(GROUP_BOT, "") - except: pass if checked and not status: print('Disconnected from DHT.')