]> git.ipfire.org Git - location/libloc.git/commitdiff
location-query: Do not validate database every time
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2019 14:54:29 +0000 (14:54 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2019 14:54:29 +0000 (14:54 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location-query.in

index a1ca7fe6059e7fb17a2035187a2666f6207baffd..052befb18f005a6936780a20e38a20f9fc814e63 100644 (file)
@@ -223,18 +223,6 @@ class CLI(object):
                                % (args.database, e))
                        sys.exit(1)
 
-               # Verify the database
-               try:
-                       with open(args.public_key, "r") as f:
-                               if not db.verify(f):
-                                       sys.stderr.write("location-query: Could not verify the database\n")
-                                       sys.exit(1)
-
-               # Catch any errors when loading the public key
-               except (FileNotFoundError, OSError) as e:
-                       sys.stderr.write("Could not read the public key: %s\n" % e)
-                       sys.exit(1)
-
                # Translate family
                if args.family == "ipv6":
                        args.family = socket.AF_INET6