*** mail.py.bak 2011-04-01 01:00:55.000000000 +0300 --- /usr/share/avant-window-navigator/applets/mail/mail.py 2011-04-10 17:05:13.940856525 +0300 *************** *** 655,669 **** return "https://mail.google.com/mail/" def update(self): ! f = feedparser.parse(\ ! "https://%s:%s@mail.google.com/gmail/feed/atom/unread/" \ ! % (self.data["username"], self.data['password'])) ! if "bozo_exception" in f.keys(): raise LoginError(_("There seem to be problems with our \ connection to your account. Your best bet is probably \ to log out and try again.")) ! # Hehe, Google is funny. Bozo exception t = [] self.subjects = [] --- 655,676 ---- return "https://mail.google.com/mail/" def update(self): ! import urllib2 ! password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() ! password_mgr.add_password(None, 'https://mail.google.com', \ ! self.data["username"], self.data["password"]) ! auth = urllib2.HTTPBasicAuthHandler(password_mgr) ! opener = urllib2.build_opener(auth) ! ! try: ! src = opener.open('https://mail.google.com/gmail/feed/atom') ! except IOError, e: raise LoginError(_("There seem to be problems with our \ connection to your account. Your best bet is probably \ to log out and try again.")) ! ! f = feedparser.parse(src.read()) t = [] self.subjects = []