diff --git a/create_db.py b/create_db.py index 485b312..a15cd43 100755 --- a/create_db.py +++ b/create_db.py @@ -120,17 +120,20 @@ if __name__ == '__main__': if not os.path.exists(args.source + '/' + args.states): logger.critical('can\'t find source file for states') + sys.exit(1) states = import_states_csv(args.source + '/' + args.states) logger.debug(states) - if not os.path.exists(args.source + '/' + args.states): + if not os.path.exists(args.source + '/' + args.departments): logger.critical('can\'t find source file for departments') + sys.exit(1) departments = import_department_csv(args.source + '/' + args.departments) logger.debug(departments) if not os.path.exists(args.source + '/' + args.towns): logger.critical('can\'t find source file for departments') + sys.exit(1) towns = import_towns_csv(args.source + '/' + args.towns) logger.debug(towns)