Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
5b3a28ad
Commit
5b3a28ad
authored
Aug 26, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for ZEO 2 and add -1 option to talk to ZEO 1 server.
parent
69c791c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
src/scripts/zeoup.py
src/scripts/zeoup.py
+12
-5
No files found.
src/scripts/zeoup.py
View file @
5b3a28ad
...
...
@@ -19,6 +19,8 @@ Options:
--nowrite -- Do not update the zeoup counter.
-1 -- Connect to a ZEO 1.0 server.
You must specify either -p and -h or -U.
"""
...
...
@@ -30,16 +32,19 @@ import ZODB
from
ZODB.POSException
import
ConflictError
from
ZEO.ClientStorage
import
ClientStorage
ZEO_VERSION
=
2
def
check_server
(
addr
,
storage
,
write
):
cs
=
ClientStorage
(
addr
,
storage
=
storage
,
debug
=
1
,
wait_for_server_on_startup
=
0
)
if
ZEO_VERSION
==
2
:
cs
=
ClientStorage
(
addr
,
storage
=
storage
,
debug
=
1
,
wait
=
1
)
else
:
cs
=
ClientStorage
(
addr
,
storage
=
storage
,
debug
=
1
,
wait_for_server_on_startup
=
1
)
# _startup() is an artifact of the way ZEO 1.0 works. The
# ClientStorage doesn't get fully initialized until registerDB()
# is called. The only thing we care about, though, is that
# registerDB() calls _startup().
# XXX Is connecting a DB with wait_for_server_on_startup=0 a
# sufficient test for upness?
db
=
ZODB
.
DB
(
cs
)
cn
=
db
.
open
()
root
=
cn
.
root
()
...
...
@@ -64,7 +69,7 @@ def main():
write
=
1
storage
=
'1'
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'p:h:U:S:'
,
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'p:h:U:S:
1
'
,
[
'nowrite'
])
for
o
,
a
in
opts
:
if
o
==
'-p'
:
...
...
@@ -77,6 +82,8 @@ def main():
storage
=
a
elif
o
==
'--nowrite'
:
write
=
0
elif
o
==
'-1'
:
ZEO_VERSION
=
1
except
Exception
,
err
:
print
err
usage
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment