telepathy-idle: idletest: handle PART with no message argument

Will Thompson wjt at kemper.freedesktop.org
Wed Nov 14 11:12:54 PST 2012


Module: telepathy-idle
Branch: master
Commit: f51c7b9cd378a561a9926d0860c26b7581dd4dc0
URL:    http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=f51c7b9cd378a561a9926d0860c26b7581dd4dc0

Author: Will Thompson <will.thompson at collabora.co.uk>
Date:   Wed Nov 14 17:10:24 2012 +0000

idletest: handle PART with no message argument

---

 tests/twisted/idletest.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tests/twisted/idletest.py b/tests/twisted/idletest.py
index 6325cf8..13251a6 100644
--- a/tests/twisted/idletest.py
+++ b/tests/twisted/idletest.py
@@ -102,7 +102,13 @@ class BaseIRCServer(irc.IRC):
             self.rooms.remove(room)
         except ValueError:
             pass
-        self.sendPart(room, self.nick, args[1])
+
+        try:
+            message = args[1]
+        except IndexError:
+            message = None
+
+        self.sendPart(room, self.nick, message)
 
     def sendJoin(self, room, members=[]):
         members.append(self.nick)



More information about the telepathy-commits mailing list