[Bugfix] fname referenced before assignment.
This commit is contained in:
parent
897b915eff
commit
cf5cae0ad4
21
QtPyLoT.py
21
QtPyLoT.py
@ -1074,17 +1074,6 @@ class MainWindow(QMainWindow):
|
||||
filename = 'PyLoT_' + eventname
|
||||
outpath = os.path.join(directory, filename)
|
||||
title = 'Save pick data ...'
|
||||
# if not outformat:
|
||||
# outformat = settings.value('output/Format')
|
||||
# outformat = outformat[0:4]
|
||||
# else:
|
||||
# selected_filter = "NonLinLoc observation file (*.obs)"
|
||||
# fname = outpath
|
||||
# if outformat == '.obs':
|
||||
# file_filter = "NonLinLoc observation file (*.obs)"
|
||||
# elif outformat == '.cnv':
|
||||
# file_filter = "VELEST observation file format (*.cnv)"
|
||||
# elif outformat == '.xml':
|
||||
file_filter = "(*.xml *.obs *.cnv)"
|
||||
|
||||
if dlgflag == 1:
|
||||
@ -1093,12 +1082,11 @@ class MainWindow(QMainWindow):
|
||||
outpath,
|
||||
file_filter)
|
||||
|
||||
# fbasename, exform = os.path.splitext(fname)
|
||||
fbasename = fname
|
||||
try:
|
||||
fbasename = fname
|
||||
except:
|
||||
fbasename = outpath
|
||||
exform = ['.obs', '.xml', '.cnv']
|
||||
# if not exform and selected_filter or not exform in OUTPUTFORMATS:
|
||||
# exform = selected_filter.split('*')[1][:-1]
|
||||
# return fname, exform
|
||||
return fbasename, exform
|
||||
|
||||
settings = QSettings()
|
||||
@ -1148,7 +1136,6 @@ class MainWindow(QMainWindow):
|
||||
# return False
|
||||
|
||||
# export to given path
|
||||
# self.get_data().exportEvent(fbasename, exform, upperErrors=[uppererrorP[3], uppererrorS[3]])
|
||||
self.get_data().exportEvent(fbasename, exform[0], upperErrors=[uppererrorP[3], uppererrorS[3]])
|
||||
self.get_data().exportEvent(fbasename, exform[1], upperErrors=[uppererrorP[3], uppererrorS[3]])
|
||||
# self.get_data().exportEvent(fbasename, exform[2], upperErrors=[uppererrorP[3], uppererrorS[3]])
|
||||
|
Loading…
Reference in New Issue
Block a user