From fc2f1959c28af330195e32f40dbfa334e4a32578 Mon Sep 17 00:00:00 2001
From: Colm Talbot <colm.talbot@ligo.org>
Date: Mon, 30 Jul 2018 20:56:01 -0400
Subject: [PATCH] fix logic on creating prior set

---
 tupak/core/prior.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tupak/core/prior.py b/tupak/core/prior.py
index 9bdea705e..15d41305d 100644
--- a/tupak/core/prior.py
+++ b/tupak/core/prior.py
@@ -26,7 +26,11 @@ class PriorSet(dict):
         dict.__init__(self)
         if type(dictionary) is dict:
             self.update(dictionary)
-        elif filename or type(dictionary) is str:
+        elif type(dictionary) is str:
+            logger.debug('Argument "dictionary" is a string.'
+                         + ' Assuming it is intended as a file name.')
+            self.read_in_file(dictionary)
+        elif type(filename) is str:
             self.read_in_file(filename)
 
     def write_to_file(self, outdir, label):
-- 
GitLab