From a79a41b306ee450ecb00c76b976a7fe6e0f7037f Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 11 Dec 2014 18:52:54 -0800 Subject: [PATCH] Tell the user about cache rebuilds (-q to silence) --- CHANGES.txt | 1 + cache.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index bb14b82b..85068383 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,7 @@ TradeDangerous, Copyright (C) Oliver "kfsone" Smith, July 2014 ============================================================================== v6.1.9 [wip] +. (kfsone) Tell the user when we rebulid the cache (-q to silence) . (gulasch) Stations and distances . (kfsone) Mineral and Microbial are now in the correct order, . (kfsone) Big documentation cleanup, diff --git a/cache.py b/cache.py index 67952a86..e9e9a8c8 100644 --- a/cache.py +++ b/cache.py @@ -766,12 +766,17 @@ def buildCache(tdb, tdenv): are newer than the database. """ + if not tdenv.quiet: + print( + "NOTE: Rebuilding cache file: this may take a moment", + file=sys.stderr + ) + dbPath = tdb.dbPath sqlPath = tdb.sqlPath pricesPath = tdb.pricesPath # Create an in-memory database to populate with our data. - tdenv.DEBUG0("Creating temporary database in memory") tempPath = dbPath.with_suffix(".new") backupPath = dbPath.with_suffix(".prev")