diff options
| author | 2020-02-24 15:24:39 +0000 | |
|---|---|---|
| committer | 2020-02-24 15:24:39 +0000 | |
| commit | 175c0a285c0eba508fd4b93b3d858e73985339e6 (patch) | |
| tree | 783e22ccfe51c3bd92c1b53d741e683c13298545 /src/utils/parse/__init__.py | |
| parent | use "latin-1" consitently (not "iso-8859-1") (diff) | |
| signature | ||
open possibly-utf8 files with forced utf8
Diffstat (limited to 'src/utils/parse/__init__.py')
| -rw-r--r-- | src/utils/parse/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/parse/__init__.py b/src/utils/parse/__init__.py index 28f074c2..262edf4a 100644 --- a/src/utils/parse/__init__.py +++ b/src/utils/parse/__init__.py @@ -1,5 +1,5 @@ -import decimal, io, re, typing -from src.utils import datetime, errors +import decimal, re, typing +from src.utils import datetime, errors, io from .spec import * from .time import duration @@ -10,7 +10,7 @@ COMMENT_TYPES = ["#", "//"] def hashflags(filename: str ) -> typing.List[typing.Tuple[str, typing.Optional[str]]]: hashflags = [] # type: typing.List[typing.Tuple[str, typing.Optional[str]]] - with io.open(filename, mode="r", encoding="utf8") as f: + with io.open(filename, "r") as f: for line in f: line = line.strip("\n") found = False |
