From f3ce2656ede0c79655c2aff34bdd2f443b742692 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 14 Jul 2016 23:34:46 +0800 Subject: deproject_sbp.py: error if config file not exists --- deproject_sbp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deproject_sbp.py b/deproject_sbp.py index 9f00e74..432ede6 100755 --- a/deproject_sbp.py +++ b/deproject_sbp.py @@ -635,9 +635,9 @@ def main(): args = parser.parse_args() config = ConfigObj(config_default.splitlines()) - config_user = ConfigObj(args.config) + config_user = ConfigObj(open(args.config)) config.merge(config_user) - sbpfit_conf = ConfigObj(config["sbpfit_config"]) + sbpfit_conf = ConfigObj(open(config["sbpfit_config"])) try: sbpfit_outfile = sbpfit_conf[sbpfit_conf["model"]]["outfile"] except KeyError: -- cgit v1.2.2