From 1362f7e830a40bed6392628318ac080d8bc91e2a Mon Sep 17 00:00:00 2001 From: Moritz Huebner <email@moritz-huebner.de> Date: Tue, 8 Sep 2020 16:32:05 +1000 Subject: [PATCH] Fixed reading detector files with empty lines --- bilby/gw/detector/networks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bilby/gw/detector/networks.py b/bilby/gw/detector/networks.py index 4037a4d9f..caef21368 100644 --- a/bilby/gw/detector/networks.py +++ b/bilby/gw/detector/networks.py @@ -398,7 +398,7 @@ def load_interferometer(filename): with open(filename, 'r') as parameter_file: lines = parameter_file.readlines() for line in lines: - if line[0] == '#': + if line[0] == '#' or line[0] == '\n': continue split_line = line.split('=') key = split_line[0].strip() -- GitLab