diff options
Diffstat (limited to 'lib/sqlalchemy/events.py')
-rw-r--r-- | lib/sqlalchemy/events.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sqlalchemy/events.py b/lib/sqlalchemy/events.py index 8a6cb2689..2ed44f5dd 100644 --- a/lib/sqlalchemy/events.py +++ b/lib/sqlalchemy/events.py @@ -76,7 +76,7 @@ class DDLEvents(event.Events): _dispatch_target = SchemaEventTarget def before_create(self, target, connection, **kw): - """Called before CREATE statements are emitted. + r"""Called before CREATE statements are emitted. :param target: the :class:`.MetaData` or :class:`.Table` object which is the target of the event. @@ -92,7 +92,7 @@ class DDLEvents(event.Events): """ def after_create(self, target, connection, **kw): - """Called after CREATE statements are emitted. + r"""Called after CREATE statements are emitted. :param target: the :class:`.MetaData` or :class:`.Table` object which is the target of the event. @@ -108,7 +108,7 @@ class DDLEvents(event.Events): """ def before_drop(self, target, connection, **kw): - """Called before DROP statements are emitted. + r"""Called before DROP statements are emitted. :param target: the :class:`.MetaData` or :class:`.Table` object which is the target of the event. @@ -124,7 +124,7 @@ class DDLEvents(event.Events): """ def after_drop(self, target, connection, **kw): - """Called after DROP statements are emitted. + r"""Called after DROP statements are emitted. :param target: the :class:`.MetaData` or :class:`.Table` object which is the target of the event. @@ -717,7 +717,7 @@ class ConnectionEvents(event.Events): """ def handle_error(self, exception_context): - """Intercept all exceptions processed by the :class:`.Connection`. + r"""Intercept all exceptions processed by the :class:`.Connection`. This includes all exceptions emitted by the DBAPI as well as within SQLAlchemy's statement invocation process, including @@ -763,7 +763,7 @@ class ConnectionEvents(event.Events): @event.listens_for(Engine, "handle_error") def handle_exception(context): if isinstance(context.original_exception, - psycopg2.OperationalError) and \\ + psycopg2.OperationalError) and \ "failed" in str(context.original_exception): raise MySpecialException("failed operation") @@ -786,7 +786,7 @@ class ConnectionEvents(event.Events): @event.listens_for(Engine, "handle_error", retval=True) def handle_exception(context): - if context.chained_exception is not None and \\ + if context.chained_exception is not None and \ "special" in context.chained_exception.message: return MySpecialException("failed", cause=context.chained_exception) |