Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Carlos Ramos Carreño
neoppod
Commits
49e7d17f
Commit
49e7d17f
authored
Dec 20, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
neolog: do not die when a table is corrupted
parent
ad379295
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
neo/scripts/neolog.py
neo/scripts/neolog.py
+26
-9
No files found.
neo/scripts/neolog.py
View file @
49e7d17f
...
...
@@ -107,20 +107,37 @@ class Log(object):
self
.
_reload
(
p
[
0
])
except
StopIteration
:
p
=
None
except
sqlite3
.
DatabaseError
,
e
:
yield
time
.
time
(),
None
,
'PACKET'
,
self
.
_exc
(
e
)
p
=
None
try
:
for
date
,
name
,
cluster
,
nid
,
level
,
pathname
,
lineno
,
msg
in
nl
:
while
p
and
p
[
0
]
<
date
:
yield
self
.
_packet
(
*
p
)
try
:
p
=
next
(
np
,
None
)
except
sqlite3
.
DatabaseError
,
e
:
yield
time
.
time
(),
None
,
'PACKET'
,
self
.
_exc
(
e
)
p
=
None
self
.
_log_date
=
date
yield
(
date
,
self
.
_node
(
name
,
cluster
,
nid
),
getLevelName
(
level
),
msg
.
splitlines
())
except
sqlite3
.
DatabaseError
,
e
:
yield
time
.
time
(),
None
,
'LOG'
,
self
.
_exc
(
e
)
if
p
:
yield
self
.
_packet
(
*
p
)
try
:
for
p
in
np
:
yield
self
.
_packet
(
*
p
)
except
sqlite3
.
DatabaseError
,
e
:
yield
time
.
time
(),
None
,
'PACKET'
,
self
.
_exc
(
e
)
finally
:
self
.
_db
.
rollback
()
@
staticmethod
def
_exc
(
e
):
return
(
'%s: %s'
%
(
type
(
e
).
__name__
,
e
)).
splitlines
()
def
_node
(
self
,
name
,
cluster
,
nid
):
if
nid
and
not
self
.
_no_nid
:
name
=
self
.
uuid_str
(
nid
)
...
...
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