Merge lp:~roignac/gwibber/Bug614742-facebook-auth-error into lp:gwibber

Proposed by Vadim Rutkovsky
Status: Rejected
Rejected by: Robert Bruce Park
Proposed branch: lp:~roignac/gwibber/Bug614742-facebook-auth-error
Merge into: lp:gwibber
Diff against target: 113 lines (+21/-23)
3 files modified
gwibber/lib/gtk/facebook.py (+9/-8)
gwibber/microblog/util/exceptions.py (+1/-2)
po/gwibber.pot (+11/-13)
To merge this branch: bzr merge lp:~roignac/gwibber/Bug614742-facebook-auth-error
Reviewer Review Type Date Requested Status
Robert Bruce Park Disapprove
gwibber-committers Pending
Review via email: mp+36794@code.launchpad.net

Description of the change

This fix shows error message when authorized in Facebook. Also, had to modify generic error message and translation templates.

To post a comment you must log in.
Revision history for this message
Robert Bruce Park (robru) wrote :

Thanks for taking the time to submit this patch, unfortunately Gwibber has gone through extensive changes recently and your patch no longer applies to the latest codebase.

Fortunately, the bug you were attempting to fix is no longer present in the current codebase. Authentication is now handled by Ubuntu Online Accounts, and there are not currently any known issues with Facebook.

Please try out the latest Gwibber, I think you'll be quite pleased with what we've accomplished.

review: Disapprove

Unmerged revisions

869. By Vadim Rutkovsky

Facebook authorization page now shows the error message

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gwibber/lib/gtk/facebook.py'
2--- gwibber/lib/gtk/facebook.py 2010-09-15 07:50:53 +0000
3+++ gwibber/lib/gtk/facebook.py 2010-09-27 21:14:03 +0000
4@@ -26,7 +26,7 @@
5 from gtk import Builder
6 import gwibber.microblog
7 from gwibber.microblog import facebook
8-from gwibber.microblog.util import facelib
9+from gwibber.microblog.util import facelib, exceptions
10 from gwibber.microblog.util.const import *
11 # Try to import * from custom, install custom.py to include packaging
12 # customizations like distro API keys, etc
13@@ -156,13 +156,14 @@
14 self.dialog.get_object("vbox_save").show()
15 elif self.dialog:
16 self.dialog.get_object("vbox_create").show()
17- except:
18- #FIXME: We should do this in the same window
19- pass
20- web.hide()
21- self.window.resize(self.win_w, self.win_h)
22- self.ui.get_object("vbox1").show()
23- self.ui.get_object("expander1").show()
24+ self.ui.get_object("vbox1").show()
25+ self.ui.get_object("expander1").show()
26+ except gwibber.microblog.util.facelib.FacebookError as e:
27+ #FIXME: another error should be used
28+ raise exceptions.GwibberServiceError("authentication", service = "Facebook", message = str(e))
29+ finally:
30+ web.hide()
31+ self.window.resize(self.win_w, self.win_h)
32
33 if title.get_title() == "Failure":
34 gtk.gdk.threads_enter()
35
36=== modified file 'gwibber/microblog/util/exceptions.py'
37--- gwibber/microblog/util/exceptions.py 2010-09-09 23:05:31 +0000
38+++ gwibber/microblog/util/exceptions.py 2010-09-27 21:14:03 +0000
39@@ -33,10 +33,9 @@
40 else:
41 log.logger.error("%s failure: %s:%s - %s", kind, service, username, message)
42
43- display_message = _("There was an %(kind)s failure from %(service)s for account %(account)s, error was %(error)s") % {
44+ display_message = _("There was an %(kind)s failure from %(service)s, error was %(error)s") % {
45 "kind": kind,
46 "service": service,
47- "account": username,
48 "error": message
49 }
50 title = _("Gwibber")
51
52=== modified file 'po/gwibber.pot'
53--- po/gwibber.pot 2010-09-15 07:50:53 +0000
54+++ po/gwibber.pot 2010-09-27 21:14:03 +0000
55@@ -8,7 +8,7 @@
56 msgstr ""
57 "Project-Id-Version: PACKAGE VERSION\n"
58 "Report-Msgid-Bugs-To: \n"
59-"POT-Creation-Date: 2010-09-15 03:49-0400\n"
60+"POT-Creation-Date: 2010-09-28 00:09+0300\n"
61 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
62 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
63 "Language-Team: LANGUAGE <LL@li.org>\n"
64@@ -18,7 +18,7 @@
65 "Content-Transfer-Encoding: 8bit\n"
66 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
67
68-#: ../gwibber.desktop.in.h:1 ../gwibber/microblog/util/exceptions.py:42
69+#: ../gwibber.desktop.in.h:1 ../gwibber/microblog/util/exceptions.py:41
70 msgid "Gwibber"
71 msgstr ""
72
73@@ -240,32 +240,30 @@
74 msgid "%s has been authorized by Facebook"
75 msgstr ""
76
77-#: ../gwibber/lib/gtk/facebook.py:170
78+#: ../gwibber/lib/gtk/facebook.py:171
79 msgid "Facebook authorization failed. Please try again."
80 msgstr ""
81
82 #: ../gwibber/microblog/util/exceptions.py:36
83 #, python-format
84-msgid ""
85-"There was an %(kind)s failure from %(service)s for account %(account)s, "
86-"error was %(error)s"
87+msgid "There was an %(kind)s failure from %(service)s, error was %(error)s"
88 msgstr ""
89
90-#: ../gwibber/microblog/util/exceptions.py:45
91+#: ../gwibber/microblog/util/exceptions.py:44
92 #, python-format
93 msgid "Authentication error from %(service)s for account %(account)s"
94 msgstr ""
95
96-#: ../gwibber/microblog/util/exceptions.py:49
97+#: ../gwibber/microblog/util/exceptions.py:48
98 msgid "Gwibber Authentication Error"
99 msgstr ""
100
101+#: ../gwibber/microblog/util/exceptions.py:51
102+#, python-format
103+msgid "There was a network error communicating with %(message)s"
104+msgstr ""
105+
106 #: ../gwibber/microblog/util/exceptions.py:52
107-#, python-format
108-msgid "There was a network error communicating with %(message)s"
109-msgstr ""
110-
111-#: ../gwibber/microblog/util/exceptions.py:53
112 msgid "Gwibber Network Error"
113 msgstr ""
114