Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Authors: # Jason Gerard DeRose <jderose@redhat.com> # # Copyright (C) 2008 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
Base classes for all backed-end plugins. """
""" Base class for all backend plugins. """
""" Base class for backend plugins that create connections.
In addition to the nicety of providing a standard connection API, all backend plugins that create connections should use this base class so that `request.destroy_context()` can properly close all open connections. """
else:
""" Create thread-local connection. """ "connect: 'context.%s' already exists in thread %r" % ( self.id, threading.currentThread().getName() ) )
"disconnect: 'context.%s' does not exist in thread %r" % ( self.id, threading.currentThread().getName() ) )
""" Return ``True`` if thread-local connection on `request.context` exists. """
""" Return thread-local connection. """ self.id, threading.currentThread().getName()) )
""" client_ip: The IP address of the remote client. """
else: self.Backend.xmlclient.connect(verbose=(self.env.verbose >= 2), fallback=self.env.fallback, delegate=self.env.delegate) setattr(context, "client_ip", client_ip)
destroy_context()
'non-public: %s: %s', e.__class__.__name__, str(e) ) except Exception, e: self.exception( 'unhandled exception: %s: %s', e.__class__.__name__, str(e) ) error = InternalError() |