~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/replication/helpers.py

[rs=buildbot-poller] automatic merge from stable. Revisions: 13516
        included.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
__all__ = []
8
8
 
9
9
import subprocess
10
 
import sys
11
10
from tempfile import NamedTemporaryFile
12
11
from textwrap import dedent
13
12
 
168
167
                 block indefinitely.
169
168
 
170
169
    :param exit_on_fail: If True, on failure of the slonik script
171
 
                         sys.exit is invoked using the slonik return code.
 
170
                         SystemExit is raised using the slonik return code.
172
171
 
173
172
    :param auto_preamble: If True, the generated preamble will be
174
173
                          automatically included.
205
204
    if returncode != 0:
206
205
        log.error("slonik script failed")
207
206
        if exit_on_fail:
208
 
            sys.exit(1)
 
207
            raise SystemExit(1)
209
208
 
210
209
    return returncode == 0
211
210
 
526
525
 
527
526
    lpmain_tables, lpmain_sequences = calculate_replication_set(
528
527
        cur, LPMAIN_SEED)
529