X-Git-Url: http://git.ipfire.org/?p=location%2Flibloc.git;a=blobdiff_plain;f=src%2Fpython%2Flocation.in;fp=src%2Fpython%2Flocation.in;h=5189738c449cb082e0d3cef6b88d57e4818335b7;hp=c4987a5ccae6672606b60ad2602f770520bf42f6;hb=2201d9043d3172f83abbe48fbeb464e2fbe98da0;hpb=977699870018c5916246461469cf3d4be332c1ec diff --git a/src/python/location.in b/src/python/location.in index c4987a5..5189738 100644 --- a/src/python/location.in +++ b/src/python/location.in @@ -199,9 +199,14 @@ class CLI(object): try: db = location.Database(args.database) except FileNotFoundError as e: - sys.stderr.write("location: Could not open database %s: %s\n" \ - % (args.database, e)) - sys.exit(1) + # Allow continuing without a database + if args.func == self.handle_update: + db = None + + else: + sys.stderr.write("location: Could not open database %s: %s\n" \ + % (args.database, e)) + sys.exit(1) # Translate family (if present) if "family" in args: