Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodbtools
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
zodbtools
Commits
55853615
Commit
55853615
authored
Jan 08, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
analyze: minor syntax tweaks for python3 compatibility
parent
7d24147b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
zodbtools/zodbanalyze.py
zodbtools/zodbanalyze.py
+3
-3
No files found.
zodbtools/zodbanalyze.py
View file @
55853615
...
@@ -31,7 +31,7 @@ class DeltaFileStorage(
...
@@ -31,7 +31,7 @@ class DeltaFileStorage(
pass
pass
class
DeltaFileIterator
(
FileIterator
):
class
DeltaFileIterator
(
FileIterator
):
def
__init__
(
self
,
filename
,
start
=
None
,
stop
=
None
,
pos
=
0
L
):
def
__init__
(
self
,
filename
,
start
=
None
,
stop
=
None
,
pos
=
0
):
assert
isinstance
(
filename
,
str
)
assert
isinstance
(
filename
,
str
)
file
=
open
(
filename
,
'rb'
)
file
=
open
(
filename
,
'rb'
)
self
.
_file
=
file
self
.
_file
=
file
...
@@ -241,7 +241,7 @@ def analyze_rec(report, record):
...
@@ -241,7 +241,7 @@ def analyze_rec(report, record):
report
.
CBYTESMAP
[
type
]
=
report
.
CBYTESMAP
.
get
(
type
,
0
)
+
size
-
fsize
report
.
CBYTESMAP
[
type
]
=
report
.
CBYTESMAP
.
get
(
type
,
0
)
+
size
-
fsize
report
.
TYPEMAP
[
type
]
=
report
.
TYPEMAP
.
get
(
type
,
0
)
+
1
report
.
TYPEMAP
[
type
]
=
report
.
TYPEMAP
.
get
(
type
,
0
)
+
1
report
.
TYPESIZE
[
type
]
=
report
.
TYPESIZE
.
get
(
type
,
0
)
+
size
report
.
TYPESIZE
[
type
]
=
report
.
TYPESIZE
.
get
(
type
,
0
)
+
size
except
Exception
,
err
:
except
Exception
as
err
:
print
(
err
,
file
=
sys
.
stderr
)
print
(
err
,
file
=
sys
.
stderr
)
__doc__
=
"""%(program)s: Analyzer for ZODB data or repozo deltafs
__doc__
=
"""%(program)s: Analyzer for ZODB data or repozo deltafs
...
@@ -274,7 +274,7 @@ def main(argv):
...
@@ -274,7 +274,7 @@ def main(argv):
opts
,
args
=
getopt
.
getopt
(
argv
[
1
:],
opts
,
args
=
getopt
.
getopt
(
argv
[
1
:],
'hcd'
,
[
'help'
,
'csv'
,
'dbm'
])
'hcd'
,
[
'help'
,
'csv'
,
'dbm'
])
path
=
args
[
0
]
path
=
args
[
0
]
except
(
getopt
.
GetoptError
,
IndexError
)
,
msg
:
except
(
getopt
.
GetoptError
,
IndexError
)
as
msg
:
usage
(
sys
.
stderr
,
msg
)
usage
(
sys
.
stderr
,
msg
)
sys
.
exit
(
2
)
sys
.
exit
(
2
)
...
...
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