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