location: Fix Python syntax error in verify()
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Oct 2020 09:52:36 +0000 (09:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Oct 2020 09:52:36 +0000 (09:52 +0000)
The database is now being opened before the requested
method is called and handle_verify() wasn't updated.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location.in

index 44ad726..b5e5758 100644 (file)
@@ -453,13 +453,7 @@ class CLI(object):
 
                return 0
 
-       def handle_verify(self, ns):
-               try:
-                       db = location.Database(ns.database)
-               except FileNotFoundError as e:
-                       log.error("%s: %s" % (ns.database, e))
-                       return 127
-
+       def handle_verify(self, db, ns):
                # Verify the database
                with open(ns.public_key, "r") as f:
                        if not db.verify(f):