Add logging, because why not
This commit is contained in:
@@ -31,9 +31,12 @@ from gui.builtinViewColumns.state import State
|
||||
from gui.bitmapLoader import BitmapLoader
|
||||
import gui.builtinViews.emptyView
|
||||
from gui.utils.exportHtml import exportHtml
|
||||
from logging import getLogger, Formatter
|
||||
|
||||
import gui.globalEvents as GE
|
||||
|
||||
logger = getLogger(__name__)
|
||||
|
||||
#Tab spawning handler
|
||||
class FitSpawner(gui.multiSwitch.TabSpawner):
|
||||
def __init__(self, multiSwitch):
|
||||
@@ -343,6 +346,7 @@ class FittingView(d.Display):
|
||||
populate = sFit.removeModule(self.activeFitID, fit.modules.index(module))
|
||||
except ValueError:
|
||||
# This module isn't in our list of modules, don't remove anything. Likely a special snowflake.
|
||||
logger.debug("Failed attempt to remove %s from fit" % module.item.name)
|
||||
populate = None
|
||||
|
||||
if populate is not None:
|
||||
@@ -510,6 +514,7 @@ class FittingView(d.Display):
|
||||
try:
|
||||
mod.charge
|
||||
except AttributeError:
|
||||
# The attribute doesn't exist at all. Set to none so we don't get errors later.
|
||||
mod.charge = None
|
||||
|
||||
if mod.charge is not None:
|
||||
|
||||
Reference in New Issue
Block a user