Commit e650766b authored by Jeremy Hylton's avatar Jeremy Hylton

Merge fixes from ZODB3 3.1 branch.

parent 57e58ca1
...@@ -47,7 +47,8 @@ def connect(storage): ...@@ -47,7 +47,8 @@ def connect(storage):
raise RuntimeError, "Unable to connect to ZEO server" raise RuntimeError, "Unable to connect to ZEO server"
def pack1(addr, storage, days, wait): def pack1(addr, storage, days, wait):
cs = ClientStorage(addr, storage=storage, wait_for_server_on_startup=wait) cs = ClientStorage(addr, storage=storage,
wait_for_server_on_startup=wait)
if wait: if wait:
# _startup() is an artifact of the way ZEO 1.0 works. The # _startup() is an artifact of the way ZEO 1.0 works. The
# ClientStorage doesn't get fully initialized until registerDB() # ClientStorage doesn't get fully initialized until registerDB()
...@@ -60,7 +61,7 @@ def pack1(addr, storage, days, wait): ...@@ -60,7 +61,7 @@ def pack1(addr, storage, days, wait):
cs.pack(wait=1, days=days) cs.pack(wait=1, days=days)
cs.close() cs.close()
def pack2(addr, storage, days, wait): def pack2(addr, storage, days):
cs = ClientStorage(addr, storage=storage, wait=1) cs = ClientStorage(addr, storage=storage, wait=1)
cs.pack(wait=1, days=days) cs.pack(wait=1, days=days)
cs.close() cs.close()
...@@ -111,7 +112,7 @@ def main(): ...@@ -111,7 +112,7 @@ def main():
if zeoversion == 1: if zeoversion == 1:
pack1(addr, storage, days, wait) pack1(addr, storage, days, wait)
else: else:
pack(addr, storage, days) pack2(addr, storage, days)
if __name__ == "__main__": if __name__ == "__main__":
try: try:
......
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