Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix shadow DB path lossage introduced in 6ca8eb9...

(Shadow path is not relative to config location!)
  • Loading branch information...
commit 9f0dcba9d98ea52a325784c402d647a9106378a6 1 parent e2ce855
@timmc authored
@@ -11,3 +11,18 @@ on that database format may be found in ./doc/
Version 0.2.0.
Requires Python 2.7 (translatable to Py3K) and the sqlite3 bindings.
+## Changelog
+### v0.2.0
+* Initial release: Task 'read' seems to work.
+* Gracefully handles duplicate images
+* Fast processing of unchanged images (still slow on others)
+* Config change: `main_db3_filename` to `gal_db_path` (new semantics)
+* Added environment debug flag: `KPA_DEBUG`
+### vNext
+* Config addition: `shadow_path` for location of shadow DB
5 py/src/kpawebgen/abstraction/
@@ -39,7 +39,8 @@ class Updater(object):
# String -> Updater
def __init__(self, kpadir, shadow_path):
- """Takes the location of the KPA root directory."""
+ """Takes the location of the KPA root directory and a relative path to
+ the shadow DB."""
db_path = os.path.abspath(os.path.join(kpadir, shadow_path))
self.shadow = Shadow(db_path)
self.reader = Reader(kpadir)
@@ -50,11 +51,13 @@ def update(self, force=False):
files. Does not update if index file has not changed and force=False
(default). Returns boolean indicating whether an update was performed."""
new_checksum = self.reader.get_checksum() # will need either way
if force:
need_update = True
old_checksum = self.shadow.get_checksum()
need_update = old_checksum != new_checksum
if not need_update:
return False
2  py/src/kpawebgen/
@@ -73,7 +73,7 @@ def dispatch(self, config_loc, sequence):
def act_read(self):
"""Update our DB with the latest KPA data."""
did = Updater(self.settings.abspath('kpa_dir'),
- self.settings.abspath('shadow_path')).update()
+ self.settings.require('shadow_path')).update()
if not did:
print("Skipping read since DB has not changed.", file=sys.stdout)
Please sign in to comment.
Something went wrong with that request. Please try again.