X-Git-Url: http://git.treefish.org/~alex/photosort.git/blobdiff_plain/6d44902ddae12804578e256a93b593430ec75cb9..4ff31898a4b6230a0d68f98a11e8cd19e361c162:/src/bunch.py diff --git a/src/bunch.py b/src/bunch.py index 2b98734..5bc3edd 100644 --- a/src/bunch.py +++ b/src/bunch.py @@ -14,7 +14,7 @@ class Bunch: self.migrator = migrator self.cleanup = cleanup - def __init__(self, idx, cfg): + def __init__(self, idx, cache_dir, cfg): self._idx = idx source_idx = 1 self._sources = [] @@ -25,7 +25,7 @@ class Bunch: DirTrigger(src_dir_cfg['path'], src_dir_cfg['cool_time'], src_dir_cfg['max_time']), Migrator(src_dir_cfg['path'], cfg['dst_dir']['path'], - os.path.join(cfg['cache_dir'], "%d.db" % idx)), + os.path.join(cache_dir, "%d.db" % idx)), src_dir_cfg['cleanup'] ) )