From 4036ac8cd22bde8f288b85179c2aa34995572ae5 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Wed, 19 Oct 2016 08:53:11 -0700 Subject: [PATCH] Move projectionInfo so it can't be referenced without being assigned --- eos/saveddata/fit.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 733caabc6..309cdbe35 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -461,11 +461,16 @@ class Fit(object): timer = Timer(u'Fit: {}, {}'.format(self.ID, self.name), logger) logger.debug("Starting fit calculation on: %r, withBoosters: %s", self, withBoosters) + try: + projectionInfo = self.getProjectionInfo(targetFit.ID) + except: + pass + else: + logger.debug("ProjectionInfo: %s", projectionInfo) + shadow = False if targetFit: logger.debug("Applying projections to target: %r", targetFit) - projectionInfo = self.getProjectionInfo(targetFit.ID) - logger.debug("ProjectionInfo: %s", projectionInfo) if self == targetFit: copied = self # original fit shadow = True