66import logging
77import os
88import platform
9- import re
109import sqlite3
1110import sys
1211import yaml
1716from lib import networks
1817from lib import packages
1918from lib import processor
20- from lib import statistics
2119from lib import tables
2220
2321def generate (database , manifest_file , seatmap_file ,
@@ -27,7 +25,7 @@ def generate(database, manifest_file, seatmap_file,
2725 # Create fresh database file
2826 logging .debug ('Checking if database file %s exists' , database )
2927 has_previous_db = False
30- previous_statistics = None
28+ before = {}
3129 if os .path .isfile (database ):
3230 logging .debug (
3331 'Found existing database file %s, gathering stats before deleting' ,
@@ -87,6 +85,7 @@ def generate(database, manifest_file, seatmap_file,
8785
8886 # Parse ipplan
8987 logging .debug ('Parsing lines in %s' , ipplan )
88+ lines = []
9089 try :
9190 with open (ipplan , 'r' ) as f :
9291 lines = f .readlines ()
@@ -110,7 +109,7 @@ def generate(database, manifest_file, seatmap_file,
110109 logging .debug ('Parsing manifest file as JSON' )
111110 try :
112111 with open (manifest_file , 'r' ) as f :
113- manifest = yaml . safe_load ( f . read () )
112+ manifest = json . load ( f )
114113 except Exception as e :
115114 logging .error (
116115 'Could not parse manifest file %s as JSON: %s' ,
@@ -149,6 +148,7 @@ def generate(database, manifest_file, seatmap_file,
149148 sys .exit (9 )
150149 logging .debug ('Found seatmap file \' %s\' ' , seatmap_file )
151150 logging .debug ('Parsing seatmap file as JSON' )
151+ seatmap = {}
152152 try :
153153 with open (seatmap_file , 'r' ) as f :
154154 seatmap = json .loads (f .read ())
0 commit comments