diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-07-11 23:02:20 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-07-11 23:02:20 +0800 |
commit | e5c91eddf381c8adbe9ab4ce33c4fefff8f1a41c (patch) | |
tree | 1f024ff250ec3b6c832c34462de0c6375d37833c | |
parent | a0df5f38b626ea5a063438220ee7523dee7d3ef6 (diff) | |
download | cexcess-e5c91eddf381c8adbe9ab4ce33c4fefff8f1a41c.tar.bz2 |
calc_mass_potential.py: fix the bug about user config file
-rwxr-xr-x | calc_mass_potential.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/calc_mass_potential.py b/calc_mass_potential.py index 8cfe24e..bb49501 100755 --- a/calc_mass_potential.py +++ b/calc_mass_potential.py @@ -608,8 +608,8 @@ def main(): args = parser.parse_args() config = ConfigObj(config_default.splitlines()) - if args.config != "": - config_user = ConfigObj(args.config) + if args.config is not None: + config_user = ConfigObj(open(args.config)) config.merge(config_user) ne_profile = np.loadtxt(config["ne_profile"]) |