Skip to content

Commit c854ea7

Browse files
MuckTdavehunt
authored andcommitted
Remove try/except block as it is no longer required
1 parent dbde113 commit c854ea7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pytest_variables/plugin.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,8 @@
1414

1515

1616
def default(module, path):
17-
try:
18-
with io.open(path, 'r', encoding='utf8') as f:
19-
return module.load(f)
20-
except TypeError:
21-
# NOTE: python 3.2-3.5 json expects string,
22-
# so we should rely on system encoding.
23-
# This is fixed in newer versions.
24-
with open(path) as f:
25-
return module.load(f)
17+
with io.open(path, 'r', encoding='utf8') as f:
18+
return module.load(f)
2619

2720

2821
parser_table = {

0 commit comments

Comments
 (0)