Fix improper use of operator "is" when comparing to literal values
This commit is contained in:
@@ -839,7 +839,7 @@ class APIView(wx.Panel):
|
||||
|
||||
def getActiveCharacter(self):
|
||||
selection = self.charChoice.GetCurrentSelection()
|
||||
return self.charChoice.GetClientData(selection) if selection is not -1 else None
|
||||
return self.charChoice.GetClientData(selection) if selection != -1 else None
|
||||
|
||||
def ssoListChanged(self, event):
|
||||
if not self: # todo: fix event not unbinding properly
|
||||
|
||||
@@ -122,7 +122,7 @@ class CharacterSelection(wx.Panel):
|
||||
|
||||
def getActiveCharacter(self):
|
||||
selection = self.charChoice.GetCurrentSelection()
|
||||
return self.charChoice.GetClientData(selection) if selection is not -1 else None
|
||||
return self.charChoice.GetClientData(selection) if selection != -1 else None
|
||||
|
||||
def refreshCharacterList(self, event=None):
|
||||
choice = self.charChoice
|
||||
|
||||
@@ -254,7 +254,7 @@ class MainFrame(wx.Frame):
|
||||
except:
|
||||
fits.remove(id)
|
||||
|
||||
if not self.prevOpenFits['enabled'] or len(fits) is 0:
|
||||
if not self.prevOpenFits['enabled'] or len(fits) == 0:
|
||||
# add blank page if there are no fits to be loaded
|
||||
self.fitMultiSwitch.AddPage()
|
||||
return
|
||||
|
||||
@@ -88,7 +88,7 @@ def _resolve_ship(fitting, sMkt, b_localized):
|
||||
pyfalog.warning("Caught exception on _resolve_ship")
|
||||
pyfalog.error(e)
|
||||
limit -= 1
|
||||
if limit is 0:
|
||||
if limit == 0:
|
||||
break
|
||||
shipType = anything
|
||||
must_retry = True
|
||||
@@ -132,7 +132,7 @@ def _resolve_module(hardware, sMkt, b_localized):
|
||||
pyfalog.warning("Caught exception on _resolve_module")
|
||||
pyfalog.error(e)
|
||||
limit -= 1
|
||||
if limit is 0:
|
||||
if limit == 0:
|
||||
break
|
||||
moduleName = emergency
|
||||
must_retry = True
|
||||
|
||||
Reference in New Issue
Block a user