So basically you are returning the encoding and the profile so that the thing using oscar.py (pyaim-t/whatever) would then handle the encoding properly. (ideally, at some point, I had wanted to have oscar.py itself -only- pass back the "unicode string" type or whatever it is.. but I never really got around to that) =)
Daniel On Mar 25, 2007, at 12:34 AM, Scott Dial wrote: > 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 > py-transports@blathersource.org > http://lists.modevia.com/cgi-bin/mailman/listinfo/py-transports _______________________________________________ py-transports mailing list py-transports@blathersource.org http://lists.modevia.com/cgi-bin/mailman/listinfo/py-transports