File: python-teams-merged.py

package info (click to toggle)
lintian-brush 0.147
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,872 kB
  • sloc: python: 17,649; makefile: 814; sh: 140; xml: 119; javascript: 3; ansic: 2
file content (24 lines) | stat: -rwxr-xr-x 890 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/python3

from email.utils import parseaddr
from lintian_brush.fixer import control, report_result, LintianIssue

with control as editor:
    try:
        old_maintainer = editor.source['Maintainer']
    except KeyError:
        pass
    else:
        maint, email = parseaddr(old_maintainer)
        if email in (
                'python-modules-team@lists.alioth.debian.org',
                'python-modules-team@alioth-lists.debian.net',
                'python-apps-team@lists.alioth.debian.org'):
            issue = LintianIssue(
                editor.source, 'python-teams-merged', info=(old_maintainer, ))
            if issue.should_fix():
                editor.source['Maintainer'] = (
                    'Debian Python Team <team+python@tracker.debian.org>')
                issue.report_fixed()

report_result('Update maintainer email for merge of DPMT and PAPT.')