This commit is contained in:
gauthiier 2019-12-22 08:21:55 +01:00
parent 008ba6a9b5
commit a6fa141bbd
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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__":