FadeoN / Distilling-Image-Dehazing-With-Heterogeneous-Task-Imitation

51 stars 8 forks source link

Why read the host name when reading the configuration file here? #6

Closed littlealili closed 3 years ago

littlealili commented 3 years ago

def read_config(): config = cp.ConfigParser() cur_path = os.path.abspath(os.path.join(os.path.dirname(file), "..")) config.read(os.path.join(cur_path, 'config.ini')) host = socket.gethostname() return config[host]

FadeoN commented 3 years ago

I used that config to use different configs in different servers. Feel free to omit that part if you dont need it.

littlealili commented 3 years ago

When return config[host], there is an error :Exception has occurred: KeyError 'pc008'. Why?