[ref #195] implementation done; some bugs have to be fixed

This commit is contained in:
2016-06-08 13:14:38 +02:00
parent e6d8701411
commit b96366e321
2 changed files with 95 additions and 6 deletions

View File

@@ -29,10 +29,12 @@ class Comparison(object):
names = list()
self._pdfs = dict()
for name, fn in kwargs.items():
if not isinstance(PDFDictionary, fn):
self._pdfs[name] = PDFDictionary.from_quakeml(fn)
else:
if isinstance(fn, PDFDictionary):
self._pdfs[name] = fn
elif isinstance(fn, dict):
self._pdfs[name] = PDFDictionary(fn)
else:
self._pdfs[name] = PDFDictionary.from_quakeml(fn)
names.append(name)
if len(names) > 2:
raise ValueError('Comparison is only defined for two '