I'm probably missing some gtk thing or an implicit import, but it looks like pick_or_listen is not defined in the following:
fail_note = gtk.MessageDialog( parent=pick_or_listen.window, flags=gtk.DIALOG_DESTROY_WITH_PARENT, buttons=gtk.BUTTONS_OK, type=gtk.MESSAGE_ERROR, message_format =_("Sorry, couchdb authentication is not yet enabled, so local pairing is not supported"))
I'm probably missing some gtk thing or an implicit import, but it looks like pick_or_listen is not defined in the following: