diff --git a/bilby/core/prior.py b/bilby/core/prior.py index f783d52ebbe46221af22973f53e1e1a7b6b11dc9..108528be04b06c20b1c59945467b8d547921be2b 100644 --- a/bilby/core/prior.py +++ b/bilby/core/prior.py @@ -66,12 +66,17 @@ class PriorDict(OrderedDict): ---------- filename: str Name of the file to be read in + + Notes + ----- + Lines beginning with '#' or empty lines will be ignored. """ - prior = {} + comments = ['#', '\n'] + prior = dict() with open(filename, 'r') as f: for line in f: - if line[0] == '#': + if line[0] in comments: continue elements = line.split('=') key = elements[0].replace(' ', '')