Skip to content

Commit ea81cb1

Browse files
committed
fix context unpacking
1 parent a70d622 commit ea81cb1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

hypernets_processor/context.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,13 @@ def unpack_config(self, config, protected_values=None):
6666
:type config: configparser.RawConfigParser
6767
:param config: config data
6868
"""
69-
cp = configparser.ConfigParser()
70-
cp.read(config)
7169

7270
protected_values = [] if protected_values is None else protected_values
73-
for section in cp.sections():
74-
for name in cp[section].keys():
71+
for section in config.sections():
72+
for name in config[section].keys():
7573

7674
if name not in protected_values:
77-
value = get_config_value(cp, section, name)
75+
value = get_config_value(config, section, name)
7876
self.set_config_value(name, value)
7977

8078
def set_config_value(self, name, value):

0 commit comments

Comments
 (0)