From 41dea3967aecfc942e1363c8c748930cc1e959fc Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 18 Oct 2011 01:33:32 +0400 Subject: [PATCH] When all fits failed to import, do not crash thread --- service/fit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/fit.py b/service/fit.py index b6ae1f4ae..bc001651c 100644 --- a/service/fit.py +++ b/service/fit.py @@ -60,7 +60,9 @@ class FitImportThread(threading.Thread): paths = self.paths sFit = Fit.getInstance() for path in paths: - importedFits += sFit.importFit(path) + pathImported = sFit.importFit(path) + if pathImported is not None: + importedFits += pathImported wx.CallAfter(self.callback, importedFits) class Fit(object):