From 3dc5b89c19792fca542c684c04155d22e5d0c70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 26 Oct 2021 19:42:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Get=20rid=20of=20a=20deprecation?= =?UTF-8?q?=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/util/yaml.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/octoprint/util/yaml.py b/src/octoprint/util/yaml.py index 914c4cea3..da1cca6b1 100644 --- a/src/octoprint/util/yaml.py +++ b/src/octoprint/util/yaml.py @@ -3,8 +3,6 @@ from __future__ import absolute_import import io -from octoprint.util import bom_aware_open - def load_from_file(file=None, path=None): """ @@ -17,7 +15,7 @@ def load_from_file(file=None, path=None): """ if path is not None: assert file is None - with bom_aware_open(path, mode="rt", encoding="utf-8") as f: + with io.open(path, mode="rt", encoding="utf-8-sig") as f: return load_from_file(file=f) if file is not None: