from lib.Config import Configuration import lib.DatabaseLayer as db try: r = Configuration.getRedisRefConnection() except: sys.exit(1) try: r.info() except: sys.exit("Redis server not running on %s:%s"%(Configuration.getRedisHost(),Configuration.getRedisPort())) RefUrl = Configuration.getRefURL() tmppath = Configuration.getTmpdir() argparser = argparse.ArgumentParser(description='Populate/update the NIST ref database') argparser.add_argument('-v', action='store_true', help='verbose output', default=False) args = argparser.parse_args() if args.v: verbose = True # check modification date try: u = Configuration.getFile(RefUrl) except: sys.exit("Cannot open url %s. Bad URL or not connected to the internet?"%(RefUrl)) i = db.getLastModified('ref')
from lib.Config import Configuration import lib.DatabaseLayer as db try: r = Configuration.getRedisRefConnection() except: sys.exit(1) try: r.info() except: sys.exit("Redis server not running on %s:%s" % (Configuration.getRedisHost(), Configuration.getRedisPort())) RefUrl = Configuration.getRefURL() tmppath = Configuration.getTmpdir() argparser = argparse.ArgumentParser( description='Populate/update the NIST ref database') argparser.add_argument('-v', action='store_true', help='verbose output', default=False) args = argparser.parse_args() if args.v: verbose = True # check modification date try: