-mevemon (0.3-1) stable; urgency=low
+mevemon (0.3-2) stable; urgency=low
- * UI cleanup and multiple account support
+ * Fix crash when starting mevemon without network connection
- -- Ryan Campbell <campbellr@gmail.com> Thu, 29 Apr 2010 20:46:12 -0007
+ -- Ryan Campbell <campbellr@gmail.com> Thu, 06 May 2010 00:16:32 -0007
Package: mevemon
Architecture: all
-Depends: python2.5, python2.5-gtk2, python-hildon | python2.5-hildon, python2.5-gobject |
- python-gobject, gnome-python | python2.5-gnome
+Depends: python2.5, python2.5-gtk2, python-hildon | python2.5-hildon,
+ python2.5-gobject | python-gobject, gnome-python | python2.5-gnome,
+ python2.5-conic | python-conic
Description: A character monitor for EVE Online.
mEveMon allows you to monitor your EVE Online character from your N900 or N8x0.
XSBC-Bugtracker: XSBC-Bugtracker: https://garage.maemo.org/tracker/?func=add&group_id=1544&atid=5565
import apicache
import os.path
+#conic is used for connection handling
+import conic
+#import socket for handling socket exceptions
+import socket
+
# we will store our preferences in gconf
import gnome.gconf
self.gconf = gnome.gconf.client_get_default()
#NOTE: remove this after a few releases
self.update_settings()
+ self.connect()
self.cached_api = eveapi.EVEAPIConnection( cacheHandler = \
apicache.cache_handler(debug=False))
self.gui = gui.mEveMonUI(self)
try:
auth = self.cached_api.auth(userID=uid, apiKey=api_key)
- except eveapi.Error:
+ except:
return None
return auth
"""
try:
sheet = self.get_auth(uid).character(char_id).CharacterSheet()
- except eveapi.Error:
+ except:
# TODO: we should really have a logger that logs this error somewhere
return None
try:
chars = self.cached_api.eve.CharacterName(ids=char_id).characters
name = chars[0].characterName
- except eveapi.Error:
+ except:
return None
return name
chars = self.cached_api.eve.CharacterID(names=name).characters
char_id = chars[0].characterID
char_name = chars[0].name
- except eveapi.Error:
+ except:
return None
return char_id
try:
api_char_list = auth.account.Characters()
char_list = [char.name for char in api_char_list.characters]
- except eveapi.Error:
+ except:
return None
return char_list
"""
try:
tree = self.cached_api.eve.SkillTree()
- except eveapi.Error:
+ except:
return None
return tree
"""
try:
skill = self.get_auth(uid).character(char_id).SkillInTraining()
- except eveapi.Error:
+ except:
return None
return skill
+ def connection_cb(self, connection, event, mgc):
+ pass
+
+
+ def connect(self):
+ connection = conic.Connection()
+ #why 0xAA55?
+ connection.connect("connection-event", self.connection_cb, 0xAA55)
+ assert(connection.request_connection(conic.CONNECT_FLAG_NONE))
+
if __name__ == "__main__":
app = mEveMon()