diff options
Diffstat (limited to 'calc_coolfunc.py')
-rwxr-xr-x | calc_coolfunc.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/calc_coolfunc.py b/calc_coolfunc.py index 32a7ada..c21e6b7 100755 --- a/calc_coolfunc.py +++ b/calc_coolfunc.py @@ -4,9 +4,11 @@ # # Aaron LI # Created: 2016-06-19 -# Updated: 2016-07-11 +# Updated: 2016-07-13 # # Change logs: +# 2016-07-13: +# * Add check of the existence of t_profile # 2016-07-11: # * Use a default config to allow a minimal user config # 2016-07-04: @@ -187,6 +189,9 @@ def main(): config_user = ConfigObj(args.config) config.merge(config_user) + if not os.path.exists(config["t_profile"]): + raise FileNotFoundError("file not exists: %s" % config["t_profile"]) + redshift = config.as_float("redshift") config_data = { "prog_name": os.path.basename(sys.argv[0]), |