#!/usr/bin/python3 ############################################################################### # # # location-database - A database to determine someone's # # location on the Internet # # Copyright (C) 2018 Michael Tremer # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### import sys import tools # The user may pass a list of RIRs on the command line that should be updated update_only = sys.argv[1:] for RIR in tools.RIRS: name = RIR.__name__ # Skip RIRs that should not be updated if update_only and not name in update_only: continue rir = RIR() # Update all records from the database rir.update(name)