tests/config.py
changeset 37 5b0eb4b11940
parent 22 680631f35d83
child 49 08e4dfe1b0cb
equal deleted inserted replaced
36:e67101c22e83 37:5b0eb4b11940
     3 sys.path.insert(0, '..')
     3 sys.path.insert(0, '..')
     4 
     4 
     5 
     5 
     6 class Config(dict):
     6 class Config(dict):
     7     def __init__(self, fname):
     7     def __init__(self, fname):
     8         data = open(fname).read()
     8         with open(fname) as f:
       
     9             data = f.read()
     9         exec(data, dict(), self)
    10         exec(data, dict(), self)
    10 
    11