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
Kirill Smelkov
ZODB
Commits
9f79e5ee
Commit
9f79e5ee
authored
May 03, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separated Python imports from ZODB imports; put all global imports before
the first function defn.
parent
278c995e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
20 deletions
+30
-20
trunk/src/ZODB/fsrecover.py
trunk/src/ZODB/fsrecover.py
+30
-20
No files found.
trunk/src/ZODB/fsrecover.py
View file @
9f79e5ee
...
...
@@ -56,13 +56,36 @@ Important: The ZODB package must be importable. You may need to adjust
#
# position to start of input
# while 1:
# if end of file: break
# try: copy_transaction
# if end of file:
# break
# try:
# copy_transaction
# except:
# scan for transaction
# continue
# scan for transaction
# continue
import
sys
import
os
import
getopt
import
time
from
struct
import
unpack
from
cPickle
import
loads
try
:
import
ZODB
except
ImportError
:
if
os
.
path
.
exists
(
'ZODB'
):
sys
.
path
.
append
(
'.'
)
elif
os
.
path
.
exists
(
'FileStorage.py'
):
sys
.
path
.
append
(
'..'
)
import
ZODB
import
ZODB.FileStorage
from
ZODB.utils
import
t32
,
u64
from
ZODB.FileStorage
import
RecordIterator
from
persistent.TimeStamp
import
TimeStamp
import
sys
,
os
def
die
(
mess
=
''
,
show_docstring
=
False
):
if
mess
:
...
...
@@ -71,21 +94,8 @@ def die(mess='', show_docstring=False):
print
>>
sys
.
stderr
,
__doc__
%
sys
.
argv
[
0
]
sys
.
exit
(
1
)
try
:
import
ZODB
except
ImportError
:
if
os
.
path
.
exists
(
'ZODB'
):
sys
.
path
.
append
(
'.'
)
elif
os
.
path
.
exists
(
'FileStorage.py'
):
sys
.
path
.
append
(
'..'
)
import
ZODB
import
getopt
,
ZODB
.
FileStorage
,
time
from
struct
import
unpack
from
ZODB.utils
import
t32
,
u64
from
persistent.TimeStamp
import
TimeStamp
from
cPickle
import
loads
from
ZODB.FileStorage
import
RecordIterator
class
ErrorFound
(
Exception
):
pass
class
ErrorFound
(
Exception
):
pass
def
error
(
mess
,
*
args
):
raise
ErrorFound
(
mess
%
args
)
...
...
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