flpelerin commited on
Commit
6c4313a
·
1 Parent(s): c40cf89

Update file util.py

Browse files
Files changed (1) hide show
  1. util.py +5 -2
util.py CHANGED
@@ -2,10 +2,13 @@ import json
2
 
3
 
4
 
5
-
6
  class Config:
7
  def __init__(self, data):
8
- self.__dict__ = data
 
 
 
 
9
 
10
 
11
  class ConfigParser:
 
2
 
3
 
4
 
 
5
  class Config:
6
  def __init__(self, data):
7
+ for key, value in data.items():
8
+ if isinstance(value, dict):
9
+ setattr(self, key, Config(value))
10
+ else:
11
+ setattr(self, key, value)
12
 
13
 
14
  class ConfigParser: