From 165a94c200f753109b0011995162ab3cb97a64d6 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 7 Feb 2016 16:39:37 +0100 Subject: Various fixes to the database script --- scripts/database/database.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/database/database.py b/scripts/database/database.py index 89fe8286..f2d47717 100644 --- a/scripts/database/database.py +++ b/scripts/database/database.py @@ -207,7 +207,7 @@ def PrintData(df, outputdir): f.write(GetDeviceVendor(vendor, devtype)) for device, dfdevice in dfdevtype.groupby(["device"]): devicename = "\"%s\"," % device - f.write(" { %-48s { " % devicename) + f.write(" { %-50s { " % devicename) # Collects the paramaters for this case and prints them parameters = [] @@ -265,6 +265,7 @@ for file_json in glob.glob(glob_json): # Loads the newly imported data sys.stdout.write("## Processing '"+file_json+"'") imported_data = ImportDataFromFile(file_json) + imported_data = SanitizeVendorNames(imported_data) # Adds the new data to the database old_size = len(database.index) @@ -273,9 +274,9 @@ for file_json in glob.glob(glob_json): new_size = len(database.index) print("with "+str(new_size-old_size)+" new items") - database = SanitizeVendorNames(database) - # Stores the modified database back to disk +# Stores the modified database back to disk +if len(glob.glob(glob_json)) >= 1: print("## Storing the database to disk...") SaveDatabase(database, file_db) -- cgit v1.2.3