Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
a98f146d
Commit
a98f146d
authored
Jul 27, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse piuparts: back on readlines, more secure
parent
184b0a19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
debomatic-modules/JSONLogger.py
debomatic-modules/JSONLogger.py
+2
-9
No files found.
debomatic-modules/JSONLogger.py
View file @
a98f146d
...
...
@@ -213,15 +213,8 @@ class LogParser():
def
parse_piuparts
(
self
):
with
open
(
self
.
file
,
'r'
)
as
fd
:
offs
=
-
1024
while
True
:
fd
.
seek
(
offs
,
2
)
lines
=
fd
.
readlines
()
if
len
(
lines
)
>
1
:
last_line
=
lines
[
-
1
]
break
offs
*=
2
if
last_line
.
find
(
'ERROR:'
)
>=
0
:
lines
=
fd
.
readlines
()
if
len
(
lines
)
==
0
or
lines
[
-
1
].
find
(
'ERROR:'
)
>=
0
:
return
'E'
return
None
...
...
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