/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: Jelmer Vernooij
  • Date: 2020-04-05 19:11:34 UTC
  • mto: (7490.7.16 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200405191134-0aebh8ikiwygxma5
Populate the .gitignore file.

Show diffs side-by-side

added added

removed removed

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