diff --git a/archive/archive.py b/archive/archive.py index 37fb6ee..fc525fb 100644 --- a/archive/archive.py +++ b/archive/archive.py @@ -90,6 +90,7 @@ class Archive: def __init__(self, archive_name, config): + # this is twisted................ two constructors... dumb if isinstance(config, str): # need a filename or a dir name.... print("reading archive " + archive_name, end='') @@ -180,8 +181,7 @@ class Archive: date_ = archive.util.format_date(m, self.archive_name) if date_ is None or from_ is None: - print("\nerrorororororo") - print(m['from'] + " -- " + m['date']) + print("\nDATE ERROR: " + m['from'] + " - " + m['date']) continue diff --git a/index.py b/index.py index 57c29b2..cb3169e 100644 --- a/index.py +++ b/index.py @@ -11,9 +11,9 @@ def list_archives(archives_dir): def run(lists, archives): logging.debug("indexing: " + str(lists) + " from " + archives) - for a in archives: - archive = archive.Archive(a, archive_dir=archives) - archive.insert_db(host=config.db['host'], database=config.db['database'], user=config.db['user'], password=config.db['password']) + for a in lists: + ar = archive.Archive(a, archives) + ar.insert_db(config.db) if __name__ == "__main__":