This commit is contained in:
2017-10-31 15:01:51 +01:00
parent 53c6fe17f2
commit 89c6490019
2 changed files with 4 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ def mariadb_insert_logs(csv_entries):
csv_entry[2], csv_entry[3], csv_entry[4]] csv_entry[2], csv_entry[3], csv_entry[4]]
inserts_sql += '(%s, %s, %s, %s, %s), ' inserts_sql += '(%s, %s, %s, %s, %s), '
except IndexError: except IndexError:
print('index error for csv entry: ' + csv_entry) print('index error for csv entry: ' + str(csv_entry))
pass pass
# remove last comma for sql compatibility # remove last comma for sql compatibility
@@ -72,7 +72,7 @@ def mariadb_insert_logs(csv_entries):
try: try:
sql_cursor.execute(inserts_sql, values) sql_cursor.execute(inserts_sql, values)
except Exception: except Exception:
print('could not insert entry: ' + values) # TODO proper error handling print('could not insert entry: ' + str(values)) # TODO proper error handling
pass pass
sql_connection.commit() sql_connection.commit()

View File

@@ -23,6 +23,8 @@ def main():
# check_duplicates() TODO readd # check_duplicates() TODO readd
start = time.time() start = time.time()
print('starting analysis ' + str(start))
distinct_ttl_count = {} distinct_ttl_count = {}
# everything = {} # everything = {}