diff options
author | Bobby Rong <rjl931189261@126.com> | 2022-02-08 16:36:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 16:36:51 +0800 |
commit | f8f6b4398b4446fa48a3653cac048473040bd91a (patch) | |
tree | 646a7a1188c5a8cf10970fb05e39c7fbf36653a4 /pkgs/games | |
parent | abaa425673163610e1b33ed57205e93c52b5ad37 (diff) | |
parent | 56076698c2d08be341a9e517aa0c92242f64d7d6 (diff) |
Merge pull request #157776 from jyooru/fix/minecraft-servers
minecraft-servers: fix update.py
Diffstat (limited to 'pkgs/games')
-rwxr-xr-x | pkgs/games/minecraft-servers/update.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/games/minecraft-servers/update.py b/pkgs/games/minecraft-servers/update.py index 4fe84ee21a590..0e7f10a8c9323 100755 --- a/pkgs/games/minecraft-servers/update.py +++ b/pkgs/games/minecraft-servers/update.py @@ -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") |