def error(self, summary, message):
     return error(self.window_main, summary, message)
                                         Gtk.MessageType.ERROR,Gtk.ButtonsType.CLOSE,"")
              dialog.set_title("")
              dialog.set_markup(primary);
              dialog.format_secondary_text(secondary);
              dialog.run()
              dialog.destroy()
          except IOError:
              primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \
                        _("Could not download the release notes")
              secondary = _("Please check your internet connection.")
              dialog = Gtk.MessageDialog(self.window_main,Gtk.DialogFlags.MODAL,
                                         Gtk.MessageType.ERROR,Gtk.ButtonsType.CLOSE,"")
              dialog.set_title("")
              dialog.set_markup(primary);
              dialog.format_secondary_text(secondary);
              dialog.run()
              dialog.destroy()
          socket.setdefaulttimeout(timeout)              
          self.window_main.set_sensitive(True)
          self.window_main.get_window().set_cursor(None)
          # user clicked cancel
          if res == Gtk.ResponseType.OK:
              return True
      return False

if __name__ == "__main__":
    error(None, "summary","message")
    d = DistUpgradeFetcherGtk(None,None)
    print d.authenticate('/tmp/Release','/tmp/Release.gpg')