From 04f3a623821ea52dca8f8eb67c9d493331d0b093 Mon Sep 17 00:00:00 2001 From: JN Date: Wed, 1 May 2024 23:39:28 +0200 Subject: [PATCH] Update __init__.py can parse utf-8 files AND ascii --- pysudoers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysudoers/__init__.py b/pysudoers/__init__.py index 6476e84..96d000c 100644 --- a/pysudoers/__init__.py +++ b/pysudoers/__init__.py @@ -280,7 +280,7 @@ def parse_file(self): """ backslash_re = re.compile(r"\\$") - with open(self._path, "r", encoding="ascii") as sudo: + with open(self._path, "r", encoding="utf-8") as sudo: for line in sudo: # Strip whitespace from beginning and end line = line.strip()