Skip to content

Commit 7b50c10

Browse files
committed
fixes
1 parent 22d2f40 commit 7b50c10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pvlib/iotools/bsrn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ def read_bsrn(filename, logical_records=('0100',)):
459459
<https://bsrn.awi.de/data/conditions-of-data-release/>`_
460460
""" # noqa: E501
461461
if str(filename).endswith('.gz'): # check if file is a gzipped (.gz) file
462-
open_func = partial(gzip.open, mode='rt')
462+
open_func, mode = gzip.open, 'rt'
463463
else:
464-
open_func = _file_context_manager(filename, mode='r')
465-
with open_func(filename) as f:
464+
open_func, mode = _file_context_manager, 'r'
465+
with open_func(filename, mode) as f:
466466
content = _parse_bsrn(f, logical_records)
467467
return content
468468

0 commit comments

Comments
 (0)