Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix ActiveTanker throwing exceptions at login screen

  • Loading branch information...
commit c3c12d00cdc161ed4dde6466e201ef2763eac317 1 parent f0f0c42
@kg authored
Showing with 14 additions and 4 deletions.
  1. +4 −1 ActiveTanker/activetanker.py
  2. +10 −3 Common/common.eve.py
View
5 ActiveTanker/activetanker.py
@@ -1,6 +1,6 @@
import shootblues
from shootblues.common import log
-from shootblues.common.eve import SafeTimer, findModule, getModuleAttributes, activateModule
+from shootblues.common.eve import SafeTimer, findModule, getModuleAttributes, activateModule, isLoggedIn
from shootblues.common.service import forceStart, forceStop
import service
import json
@@ -44,6 +44,9 @@ def updateHealth(self):
if self.disabled:
self.__updateTimer = None
return
+
+ if not isLoggedIn():
+ return
ship = eve.LocalSvc("godma").GetItem(eve.session.shipid)
if not ship:
View
13 Common/common.eve.py
@@ -29,9 +29,12 @@ def getName(id):
invtype = cfg.invtypes.Get(godmaItem.typeID)
return invtype.name
- typeInfo = cfg.invtypes.Get(id)
- if typeInfo:
- return typeInfo.name
+ try:
+ typeInfo = cfg.invtypes.Get(id)
+ if typeInfo:
+ return typeInfo.name
+ except KeyError:
+ pass
return repr(id)
@@ -51,6 +54,10 @@ def getFlagName(id, slimItem=None):
from shootblues.common.eve.state import getCachedItem
return getCachedItem(id=id, slimItem=slimItem).flag
+def isLoggedIn():
+ from shootblues.common.eve.charmonitor import serviceInstance
+ return (serviceInstance != None) and (serviceInstance.loggedInCharacter != None)
+
def getCharacterName(charID):
if not charID:
return None
Please sign in to comment.
Something went wrong with that request. Please try again.