Fix old issue with trying to open previous fits that don't exist.

This commit is contained in:
blitzmann
2017-04-21 23:43:40 -04:00
parent 2a679efc14
commit c0f74cd0a3
2 changed files with 4 additions and 2 deletions

View File

@@ -1381,7 +1381,7 @@ class ItemProperties(wx.Panel):
else:
attrName = name.title()
value = getattr(self.item, name)
except Exception as e:
except:
# TODO: Add logging to this.
# We couldn't get a property for some reason. Skip it for now.
continue

View File

@@ -255,7 +255,9 @@ class MainFrame(wx.Frame):
# Remove any fits that cause exception when fetching (non-existent fits)
for id in fits[:]:
try:
sFit.getFit(id, basic=True)
fit = sFit.getFit(id, basic=True)
if fit is None:
fits.remove(id)
except:
fits.remove(id)