/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 tools/check-newsbugs.py

  • Committer: Jelmer Vernooij
  • Date: 2018-02-18 19:18:40 UTC
  • mto: This revision was merged to the branch mainline in revision 6928.
  • Revision ID: jelmer@jelmer.uk-20180218191840-2wezg20u9ffbfmed
Fix more bees, use with rather than try/finally for some files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    # Pattern to find bug numbers
55
55
    bug_pattern = re.compile("\#([0-9]+)")
56
56
    ret = set()
57
 
    f = open(path, 'r')
58
 
    try:
 
57
    with open(path, 'r') as f:
59
58
        section = ""
60
59
        for l in f.readlines():
61
60
            if l.strip() == "":
70
69
            else:
71
70
                section += l
72
71
        return ret
73
 
    finally:
74
 
        f.close()
75
72
 
76
73
 
77
74
def print_bug_url(bugno):