~roignac/gwibber/Bug614742-facebook-auth-error

« back to all changes in this revision

Viewing changes to gwibber/lib/gtk/facebook.py

  • Committer: Vadim Rutkovsky
  • Date: 2010-09-27 21:10:18 UTC
  • Revision ID: roignac@gmail.com-20100927211018-a3qzrtklofbr4jfp
Facebook authorization page now shows the error message

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from gtk import Builder
27
27
import gwibber.microblog
28
28
from gwibber.microblog import facebook
29
 
from gwibber.microblog.util import facelib
 
29
from gwibber.microblog.util import facelib, exceptions
30
30
from gwibber.microblog.util.const import *
31
31
# Try to import * from custom, install custom.py to include packaging 
32
32
# customizations like distro API keys, etc
156
156
          self.dialog.get_object("vbox_save").show()
157
157
        elif self.dialog:
158
158
          self.dialog.get_object("vbox_create").show()
159
 
      except:
160
 
        #FIXME: We should do this in the same window
161
 
        pass
162
 
      web.hide()
163
 
      self.window.resize(self.win_w, self.win_h)
164
 
      self.ui.get_object("vbox1").show()
165
 
      self.ui.get_object("expander1").show()
 
159
        self.ui.get_object("vbox1").show()
 
160
        self.ui.get_object("expander1").show()
 
161
      except gwibber.microblog.util.facelib.FacebookError as e:
 
162
        #FIXME: another error should be used
 
163
        raise exceptions.GwibberServiceError("authentication", service = "Facebook", message = str(e))
 
164
      finally:
 
165
        web.hide()
 
166
        self.window.resize(self.win_w, self.win_h)
166
167
 
167
168
    if title.get_title() == "Failure":
168
169
      gtk.gdk.threads_enter()