Chris Carlin wrote:
>> The change I was saying that 
>> is relevant is that all messages come with an encoding (and my patch is 
>> to let you get to that for profiles).
> 
> The patches I have from you [1] don't seem to deal with encoding other 
> than to do the right thing upon failures. It doesn't seem to provide 
> access to anything extra. Am I missing something?
> 

The part that is relevant here is this:

@@ -2196,14 +2198,17 @@
          #if user.
          return self.sendSNAC(0x02, 0x15, 
'\x00\x00\x00\x01'+chr(len(user))+user).addCallback(self._cbGetProfile).addErrback(self._cbGetProfileError)

      def _cbGetProfile(self, snac):
-        user, rest = self.parseUser(snac[5],1)
+        try:
+            user, rest = self.parseUser(snac[5],1)
+        except TypeError:
+            return [None, None]
          tlvs = readTLVs(rest)
          #encoding = tlvs[1]  We're ignoring this for now
          #profile = tlvs[2]  This is what we're after

-        return tlvs.get(0x02,None)
+        return [tlvs.get(0x01,None), tlvs.get(0x02,None)]

      def _cbGetProfileError(self, result):
          return result


-- 
Scott Dial
[EMAIL PROTECTED]
[EMAIL PROTECTED]
_______________________________________________
py-transports mailing list
[email protected]
http://lists.modevia.com/cgi-bin/mailman/listinfo/py-transports

Reply via email to