lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 2201d904 authored by Michael Tremer's avatar Michael Tremer

location(8): Allow downloading a database without one on disk

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 97769987
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment