Merge branch 'master_fix_update-copyright' into 'master'
fix update-copyright when there is only year without author See merge request qt-kde-team/qt6/qt6-base!1
This commit is contained in:
commit
ed65f4eea4
17
debian/scripts/update-copyright
vendored
17
debian/scripts/update-copyright
vendored
@ -108,14 +108,17 @@ def parse_file(filename):
|
|||||||
if match:
|
if match:
|
||||||
copyright = match.group(1)
|
copyright = match.group(1)
|
||||||
max_year = min_year = int(copyright[:4])
|
max_year = min_year = int(copyright[:4])
|
||||||
if copyright[4] == '-':
|
if len(copyright) >= 5:
|
||||||
max_year = int(copyright[5:9])
|
if copyright[4] == '-':
|
||||||
author = copyright[10:]
|
max_year = int(copyright[5:9])
|
||||||
elif copyright[4:7] == ' - ':
|
author = copyright[10:]
|
||||||
max_year = int(copyright[7:11])
|
elif copyright[4:7] == ' - ':
|
||||||
author = copyright[12:]
|
max_year = int(copyright[7:11])
|
||||||
|
author = copyright[12:]
|
||||||
|
else:
|
||||||
|
author = copyright[5:]
|
||||||
else:
|
else:
|
||||||
author = copyright[5:]
|
author = ""
|
||||||
author = canonicalize_author_name(author)
|
author = canonicalize_author_name(author)
|
||||||
authors.append((min_year, max_year, author))
|
authors.append((min_year, max_year, author))
|
||||||
match = header_re.search(line)
|
match = header_re.search(line)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user