/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/news_merge/parser.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-08-23 01:15:41 UTC
  • mfrom: (7520.1.4 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200823011541-nv0oh7nzaganx2qy
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/389690

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
simple_parse's docstring).
25
25
"""
26
26
 
27
 
 
28
27
def simple_parse_lines(lines):
29
28
    """Same as simple_parse, but takes an iterable of strs rather than a single
30
29
    str.
34
33
 
35
34
def simple_parse(content):
36
35
    """Returns blocks, where each block is a 2-tuple (kind, text).
37
 
    
 
36
 
38
37
    :kind: one of 'heading', 'release', 'section', 'empty' or 'text'.
39
38
    :text: a str, including newlines.
40
39
    """
66
65
    import sys
67
66
    content = open(sys.argv[1], 'rb').read()
68
67
    for result in simple_parse(content):
69
 
        print result
 
68
        print(result)