mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
better handling of missing config files
This commit is contained in:
parent
280f656051
commit
df97f7814e
2 changed files with 6 additions and 1 deletions
|
|
@ -14,6 +14,9 @@ print default_file, os.path.isfile(default_file)
|
|||
# 1. check if the user has a ~/.gpy_config.cfg
|
||||
if os.path.isfile(user_file):
|
||||
config.read(user_file)
|
||||
else:
|
||||
elif os.path.isfile(default_file):
|
||||
# 2. if not, use the default one
|
||||
config.read(default_file)
|
||||
else:
|
||||
#3. panic
|
||||
raise ValueError, "no configuration file found"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue