]> code.delx.au - pymsnt/commitdiff
small fix
authorjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Fri, 23 Dec 2005 14:12:27 +0000 (14:12 +0000)
committerjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Fri, 23 Dec 2005 14:12:27 +0000 (14:12 +0000)
git-svn-id: http://delx.cjb.net/svn/pymsnt/trunk@63 55fbd22a-6204-0410-b2f0-b6c764c7e90a

committer: jamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>

src/tlib/msn/msn.py

index b0d37b87b2a7d020e6d24dc7e916cee801d1eda8..a008c5510637e495c932a16fdf67c0ba3b797c52 100644 (file)
@@ -1233,11 +1233,11 @@ class NotificationClient(MSNEventBase):
             self._fireCallback(int(params[0]), int(params[1]), unquote(params[3]))
 
     def handle_BPR(self, params):
-        if not self.factory.contacts: raise MSNProtocolError, "handle_BPR called with no contact list" # debug
         numParams = len(params)
         if numParams == 2: # part of a syn
             self._getStateData('last_contact').setPhone(params[0], unquote(params[1]))
         elif numParams == 4:
+            if not self.factory.contacts: raise MSNProtocolError, "handle_BPR called with no contact list" # debug
             self.factory.contacts.version = int(params[0])
             userHandle, phoneType, number = params[1], params[2], unquote(params[3])
             self.factory.contacts.getContact(userHandle).setPhone(phoneType, number)