Merge pull request #157776 from jyooru/fix/minecraft-servers

minecraft-servers: fix update.py
This commit is contained in:
Bobby Rong 2022-02-08 16:36:51 +08:00 committed by GitHub
commit f8f6b4398b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
import json
from dataclasses import dataclass, field
from datetime import datetime
from pathlib import Path
from typing import Any, Dict, List, Optional
import requests
@ -150,6 +151,6 @@ def generate() -> Dict[str, Dict[str, str]]:
if __name__ == "__main__":
with open("versions.json", "w") as file:
with open(Path(__file__).parent / "versions.json", "w") as file:
json.dump(generate(), file, indent=2)
file.write("\n")