summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-07-11 23:02:20 +0800
committerAaron LI <aaronly.me@outlook.com>2016-07-11 23:02:20 +0800
commite5c91eddf381c8adbe9ab4ce33c4fefff8f1a41c (patch)
tree1f024ff250ec3b6c832c34462de0c6375d37833c
parenta0df5f38b626ea5a063438220ee7523dee7d3ef6 (diff)
downloadcexcess-e5c91eddf381c8adbe9ab4ce33c4fefff8f1a41c.tar.bz2
calc_mass_potential.py: fix the bug about user config file
-rwxr-xr-xcalc_mass_potential.py4
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"])