diff options
Diffstat (limited to 'lib/extras.py')
-rw-r--r-- | lib/extras.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/extras.py b/lib/extras.py index dc2d5e6..8854ec2 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -500,6 +500,18 @@ class PhysicalReplicationConnection(ReplicationConnectionBase): super(PhysicalReplicationConnection, self).__init__(*args, **kwargs) +class StopReplication(Exception): + """ + Exception used to break out of the endless loop in + `~ReplicationCursor.consume_replication_stream()`. + + Subclass of `~exceptions.Exception`. Intentionally *not* inherited from + `~psycopg2.Error` as occurrence of this exception does not indicate an + error. + """ + pass + + class ReplicationCursor(_cursor): """A cursor used for communication on the replication protocol.""" |