Use simpler syntax for I/O operations

This commit is contained in:
kramo
2023-04-01 16:14:19 +02:00
parent 3bcbf8457c
commit 6899246d01
7 changed files with 12 additions and 20 deletions

View File

@@ -46,8 +46,7 @@ def bottles_parser(parent_widget):
bottles_dir = Path(schema.get_string("bottles-location")).expanduser()
current_time = int(time())
with open((bottles_dir / "library.yml"), "r") as open_file:
data = open_file.read()
data = (bottles_dir / "library.yml").read_text()
library = yaml.load(data, Loader=yaml.Loader)