~sumanah/mailman/mailman

« back to all changes in this revision

Viewing changes to src/mailman/app/docs/hooks.rst

  • Committer: Sumana Harihareswara
  • Date: 2015-01-08 21:35:58 UTC
  • mfrom: (7273.2.15 3.0)
  • Revision ID: sumanah@panix.com-20150108213558-65ym6553zj256z8p
mergeĀ fromĀ master

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    ... counter = 1
19
19
    ... def pre_hook():
20
20
    ...     global counter
21
 
    ...     print 'pre-hook:', counter
 
21
    ...     print('pre-hook:', counter)
22
22
    ...     counter += 1
23
23
    ...
24
24
    ... def post_hook():
25
25
    ...     global counter
26
 
    ...     print 'post-hook:', counter
 
26
    ...     print('post-hook:', counter)
27
27
    ...     counter += 1
28
28
    ... """, file=fp)
29
29
    >>> fp.close()
61
61
    ...     proc = subprocess.Popen(
62
62
    ...         [exe, 'lists', '--domain', 'ignore', '-q'],
63
63
    ...         cwd=ConfigLayer.root_directory, env=env,
 
64
    ...         universal_newlines=True,
64
65
    ...         stdout=subprocess.PIPE, stderr=subprocess.PIPE)
65
66
    ...     stdout, stderr = proc.communicate()
66
67
    ...     assert proc.returncode == 0, stderr