OUTPUTFORMATS in defaults defined; manage available formats just from here

This commit is contained in:
2014-12-17 06:35:12 +01:00
parent 8213cdc575
commit 3fe1e3906e
3 changed files with 11 additions and 3 deletions

View File

@@ -63,10 +63,15 @@ class Data(object):
def exportEvent(self, fnout=None, evtformat='QUAKEML'):
from pylot.core.util.defaults import OUTPUTFORMATS
if evtformat.strip() not in OUTPUTFORMATS.values():
evtformat = OUTPUTFORMATS.values()[0]
if fnout is None:
fnout = self.evtdata.getEventID()
ID = self.evtdata.getEventID()
# handle forbidden filenames especially on windows systems
fnout = fnConstructor(fnout)
fnout = fnConstructor(ID)
evtformat = evtformat.upper().strip()