Oh, and a couple more points I forgot to mention :-P

W.r.t. this code:
      if data.has_key("error"):
        if "authenticate" in data["error"]:
          raise exceptions.GwibberProtocolError("auth", 
self.account["protocol"], self.account["username"], data["error"])

1. When there is an authentication error with Twitter, the dictionary key seems 
to be "errors" and not "error" as is checked for. From a temporary 
pprint.pprint(data), when an auth error occurs, the data variable contains:
{u'errors': [{u'code': 32, u'message': u'Could not authenticate you.'}]}


2. The check for "authenticate" in data["errors"] (assuming key is changed as 
per point 1) seems it will not work, in this code. I tried this out in an 
interactive Python session:
~$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> data = {u'errors': [{u'code': 32, u'message': u'Could not authenticate 
>>> you.'}]}
>>> data
{u'errors': [{u'message': u'Could not authenticate you.', u'code': 32}]}
>>> 'authenticate' in data['errors']
False

Since you fine folks working on Gwibber will be working this area (soon,
I hope), I hope you can also fix these issues at the same time.

Thanks very much,
Ed.

** Changed in: gwibber (Ubuntu)
       Status: Incomplete => Confirmed

-- 
Gwibber doesn't refresh streams
https://bugs.launchpad.net/bugs/533017
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to