def index(request): delete_form, handled = DeleteKeypair.maybe_handle(request) if handled: return handled create_form = CreateKeypair() import_form = ImportKeypair() try: keypairs = api.keypair_list(request) except novaclient_exceptions.ClientException, e: keypairs = [] LOG.exception("ClientException in keypair index") messages.error(request, _('Error fetching keypairs: %s') % e.message)