Commit 96da9958 authored by Stéphane Blondon's avatar Stéphane Blondon Committed by sblondon

exit value is 1 if all connection to servers fail

parent 83730901
......@@ -145,12 +145,14 @@ def _main(args=None, prog=None):
if not servers:
error("No servers specified.")
server_found = False
for addr, name in servers:
try:
cs = ZEO.ClientStorage.ClientStorage(
addr, storage=name, wait=False, read_only=1)
for i in range(60):
if cs.is_connected():
server_found = True
break
time.sleep(1)
else:
......@@ -164,6 +166,8 @@ def _main(args=None, prog=None):
traceback.print_exception(*(sys.exc_info()+(99, sys.stderr)))
error("Error packing storage %s in %r" % (name, addr))
if not server_found:
error("No servers found.")
def main(*args):
root_logger = logging.getLogger()
......
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