Skip to content

Commit

Permalink
Update YAML import to new ruamel standard
Browse files Browse the repository at this point in the history
  • Loading branch information
avanwinkle committed Mar 10, 2024
1 parent 0f8a9e4 commit afb1389
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mpfmonitor/core/mpfmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from PyQt6.QtGui import *
from PyQt6.QtWidgets import *

import ruamel.yaml as yaml
from ruamel import yaml



Expand Down Expand Up @@ -259,8 +259,9 @@ def about(self):

def load_config(self):
try:
_yaml = yaml.YAML(typ='safe')
with open(self.config_file, 'r') as f:
self.config = yaml.safe_load(f)
self.config = _yaml.load(f)
except FileNotFoundError:
self.config = dict()

Expand Down

0 comments on commit afb1389

Please sign in to comment.