diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | codegen/lib/code/version.py | 12 |
2 files changed, 7 insertions, 7 deletions
@@ -7,7 +7,7 @@ A collection of Rust crates primarily for creating Minecraft bots. </p> <!-- The line below is automatically read and updated by the migrate script, so don't change it manually. --> -*Currently supported Minecraft version: `1.19.1`.* +*Currently supported Minecraft version: `1.19.2`.* ## ⚠️ Azalea is still super unfinished, you probably shouldn't use it diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index 13d9472d..35779af6 100644 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -7,8 +7,8 @@ VERSION_REGEX = r'\*Currently supported Minecraft version: `(.*)`.\*' def get_version_id() -> str: - with open(README_DIR, 'r') as f: - readme_text = f.read() + with open(README_DIR, 'rb') as f: + readme_text = f.read().decode() version_line_match = re.search(VERSION_REGEX, readme_text) if version_line_match: @@ -19,8 +19,8 @@ def get_version_id() -> str: def set_version_id(version_id: str) -> None: - with open(README_DIR, 'r') as f: - readme_text = f.read() + with open(README_DIR, 'rb') as f: + readme_text = f.read().decode() version_line_match = re.search(VERSION_REGEX, readme_text) if version_line_match: @@ -29,8 +29,8 @@ def set_version_id(version_id: str) -> None: else: raise Exception('Could not find version id in README.md') - with open(README_DIR, 'w') as f: - f.write(readme_text) + with open(README_DIR, 'wb') as f: + f.write(readme_text.encode()) def get_protocol_version() -> str: |
