diff --git a/buildcache.py b/cache.py similarity index 100% rename from buildcache.py rename to cache.py diff --git a/commands/buildcache_cmd.py b/commands/buildcache_cmd.py index 99137e18..412f1f73 100644 --- a/commands/buildcache_cmd.py +++ b/commands/buildcache_cmd.py @@ -68,7 +68,7 @@ def run(results, cmdenv, tdb): raise CommandLineError( "Prices file does not exist: {}".format(pricesFilename)) - from buildcache import buildCache + from cache import buildCache buildCache(cmdenv, dbPath, sqlPath, pricesPath, importTables) return None diff --git a/commands/update_cmd.py b/commands/update_cmd.py index 7abaf46a..ef69a256 100644 --- a/commands/update_cmd.py +++ b/commands/update_cmd.py @@ -3,7 +3,7 @@ from tradeexcept import TradeException from commands.exceptions import CommandLineError import prices -import buildcache +import cache import subprocess import os import pathlib @@ -140,7 +140,7 @@ def getEditorPaths(cmdenv, editorName, envVar, windowsFolders, winExe, nixExe): def importDataFromFile(cmdenv, tdb, path, stationID, dbFilename): cmdenv.DEBUG0("Importing data from {}".format(str(path))) - buildcache.processPricesFile(cmdenv, + cache.processPricesFile(cmdenv, db=tdb.getDB(), pricesPath=path, stationID=stationID, diff --git a/tradedb.py b/tradedb.py index 1fbcec69..54acb74c 100644 --- a/tradedb.py +++ b/tradedb.py @@ -462,8 +462,8 @@ def getMostRecentTimestamp(altPath): else: self.tdenv.DEBUG0("Building DB Cache") - import buildcache - buildcache.buildCache(self.tdenv, dbPath=self.dbPath, sqlPath=self.sqlPath, pricesPath=self.pricesPath, importTables=self.importTables) + import cache + cache.buildCache(self.tdenv, dbPath=self.dbPath, sqlPath=self.sqlPath, pricesPath=self.pricesPath, importTables=self.importTables) ############################################################