manage-shard-ranges: nicer message if we can't get_info()
Tracebacks are ugly. Change-Id: I09b907608127e4c633b554be2926245b35402dbf
This commit is contained in:
parent
be3e215829
commit
5d4303edbf
@ -515,7 +515,12 @@ def main(args=None):
|
||||
logger = get_logger({}, name='ContainerBroker', log_to_console=True)
|
||||
broker = ContainerBroker(args.container_db, logger=logger,
|
||||
skip_commits=True)
|
||||
broker.get_info()
|
||||
try:
|
||||
broker.get_info()
|
||||
except Exception as exc:
|
||||
print('Error opening container DB %s: %s' % (args.container_db, exc),
|
||||
file=sys.stderr)
|
||||
return 2
|
||||
print('Loaded db broker for %s.' % broker.path, file=sys.stderr)
|
||||
return args.func(broker, args)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user