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
20513242
Commit
20513242
authored
Feb 25, 2015
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
module: do not take care of success if not needed - prevent to always store false value
parent
771e7d18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
debomatic-modules/JSONLogger.py
debomatic-modules/JSONLogger.py
+7
-3
No files found.
debomatic-modules/JSONLogger.py
View file @
20513242
...
...
@@ -32,6 +32,7 @@ from collections import defaultdict
class
DebomaticModule_JSONLoggerStart
:
def
__init__
(
self
):
self
.
logger
=
DebomaticModule_JSONLogger
()
self
.
first
=
True
...
...
@@ -44,6 +45,7 @@ class DebomaticModule_JSONLoggerStart:
class
DebomaticModule_JSONLoggerStop
:
def
__init__
(
self
):
self
.
logger
=
DebomaticModule_JSONLogger
()
self
.
last
=
True
...
...
@@ -73,11 +75,12 @@ class DebomaticModule_JSONLogger:
return
(
'%(directory)s/pool/%(package)s/%(package)s.json'
%
{
'directory'
:
args
.
directory
,
'package'
:
args
.
package
})
def
_get_distribution_status
(
self
,
args
):
def
_get_distribution_status
(
self
,
args
,
with_success
=
False
):
"""From args to distribution status"""
status
=
{}
status
[
'status'
]
=
args
.
action
status
[
'distribution'
]
=
args
.
distribution
if
with_success
:
status
[
'success'
]
=
args
.
success
return
status
...
...
@@ -129,7 +132,7 @@ class DebomaticModule_JSONLogger:
self
.
_append_json_logfile
(
args
,
distribution
)
def
post_chroot
(
self
,
args
):
distribution
=
self
.
_get_distribution_status
(
args
)
distribution
=
self
.
_get_distribution_status
(
args
,
with_success
=
True
)
self
.
_append_json_logfile
(
args
,
distribution
)
def
pre_build
(
self
,
args
):
...
...
@@ -164,6 +167,7 @@ class DebomaticModule_JSONLogger:
# Parser for log files
class
LogParser
():
def
__init__
(
self
,
file_path
):
self
.
file
=
file_path
self
.
basename
=
os
.
path
.
basename
(
file_path
)
...
...
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