Skip to content

Commit

Permalink
Bump to v1.5.1 stable, fix for #176 (pyfa update breaks skeletons)
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Oct 1, 2014
1 parent 9b8c1ff commit 0bbc35c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Version data
version = "1.5.1"
tag = "git"
tag = "Stable"
expansionName = "Oceanus"
expansionVersion = "1.0"
evemonMinVersion = "4081"
Expand Down
11 changes: 1 addition & 10 deletions pyfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,14 @@
import os.path

import eos.db
import eos.db.migration as migration
import service.prefetch
from gui.mainFrame import MainFrame

#Make sure the saveddata db exists
if not os.path.exists(config.savePath):
os.mkdir(config.savePath)

if os.path.isfile(config.saveDB):
# If database exists, run migration after init'd database
eos.db.saveddata_meta.create_all()
migration.update(eos.db.saveddata_engine)
else:
# If database does not exist, do not worry about migration. Simply
# create and set version
eos.db.saveddata_meta.create_all()
eos.db.saveddata_engine.execute('PRAGMA user_version = %d'%config.dbversion)
eos.db.saveddata_meta.create_all()

pyfa = wx.App(False)
MainFrame()
Expand Down
25 changes: 25 additions & 0 deletions service/prefetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
#===============================================================================

import threading
import config
import os
import eos.types
import eos.db.migration as migration

class PrefetchThread(threading.Thread):
def run(self):
# We're a daemon thread, as such, interpreter might get shut down while we do stuff
Expand All @@ -31,3 +35,24 @@ def run(self):
prefetch = PrefetchThread()
prefetch.daemon = True
prefetch.start()

########
# The following code does not belong here, however until we rebuild skeletons
# to include modified pyfa.py, this is the best place to put it. See GH issue
# #176
# @ todo: move this to pyfa.py
########

#Make sure the saveddata db exists
if not os.path.exists(config.savePath):
os.mkdir(config.savePath)

if os.path.isfile(config.saveDB):
# If database exists, run migration after init'd database
eos.db.saveddata_meta.create_all()
migration.update(eos.db.saveddata_engine)
else:
# If database does not exist, do not worry about migration. Simply
# create and set version
eos.db.saveddata_meta.create_all()
eos.db.saveddata_engine.execute('PRAGMA user_version = %d'%config.dbversion)

0 comments on commit 0bbc35c

Please sign in to comment.