Fix license in mbc iit

This commit is contained in:
Tulir Asokan 2019-02-13 18:27:46 +02:00
parent f548e17c80
commit 3068245b1f
2 changed files with 4 additions and 3 deletions

View File

@ -76,7 +76,7 @@ class VersionValidator(ClickValidator):
def spdx(val: str) -> str:
if spdxlib.valid(val):
if not spdxlib.valid(val):
raise click.BadParameter(f"{val} is not a valid SPDX license identifier")
return val

View File

@ -57,6 +57,7 @@ def init(name: str, id: str, version: Version, license: str, config: bool) -> No
main_class=main_class)
with open("maubot.yaml", "w") as file:
file.write(meta)
if license:
with open("LICENSE", "w") as file:
file.write(spdx.get(license)["text"])
if not os.path.isdir(name):