Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
82eb40da
Commit
82eb40da
authored
May 04, 2009
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of a deprecation warning on Python 2.6.
parent
e825d9bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/ZODB/scripts/fstail.py
src/ZODB/scripts/fstail.py
+6
-3
No files found.
src/ZODB/scripts/fstail.py
View file @
82eb40da
...
...
@@ -19,16 +19,20 @@ from ZODB.fstools import prev_txn
import
binascii
import
getopt
import
sha
import
sys
try
:
from
hashlib
import
sha1
except
ImportError
:
from
sha
import
sha
as
sha1
def
main
(
path
,
ntxn
):
f
=
open
(
path
,
"rb"
)
f
.
seek
(
0
,
2
)
th
=
prev_txn
(
f
)
i
=
ntxn
while
th
and
i
>
0
:
hash
=
sha
.
sha
(
th
.
get_raw_data
()).
digest
()
hash
=
sha
1
(
th
.
get_raw_data
()).
digest
()
l
=
len
(
str
(
th
.
get_timestamp
()))
+
1
th
.
read_meta
()
print
"%s: hash=%s"
%
(
th
.
get_timestamp
(),
...
...
@@ -47,7 +51,6 @@ def Main():
if
k
==
'-n'
:
ntxn
=
int
(
v
)
main
(
path
,
ntxn
)
if
__name__
==
"__main__"
:
Main
()
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